9
9
import pytest
10
10
from _pytest import fixtures
11
11
from _pytest import python
12
+ from _pytest .python import _idval
12
13
13
14
14
15
class TestMetafunc :
@@ -209,8 +210,6 @@ class A:
209
210
deadline = 400.0
210
211
) # very close to std deadline and CI boxes are not reliable in CPU power
211
212
def test_idval_hypothesis (self , value ):
212
- from _pytest .python import _idval
213
-
214
213
escaped = _idval (value , "a" , 6 , None , item = None , config = None )
215
214
assert isinstance (escaped , str )
216
215
escaped .encode ("ascii" )
@@ -221,8 +220,6 @@ def test_unicode_idval(self):
221
220
escapes if they're not.
222
221
223
222
"""
224
- from _pytest .python import _idval
225
-
226
223
values = [
227
224
("" , "" ),
228
225
("ascii" , "ascii" ),
@@ -242,7 +239,6 @@ def test_unicode_idval_with_config(self):
242
239
disable_test_id_escaping_and_forfeit_all_rights_to_community_support
243
240
option. (#5294)
244
241
"""
245
- from _pytest .python import _idval
246
242
247
243
class MockConfig :
248
244
def __init__ (self , config ):
@@ -274,8 +270,6 @@ def test_bytes_idval(self):
274
270
"binary escape", where any byte < 127 is escaped into its hex form.
275
271
- python3: bytes objects are always escaped using "binary escape".
276
272
"""
277
- from _pytest .python import _idval
278
-
279
273
values = [
280
274
(b"" , "" ),
281
275
(b"\xc3 \xb4 \xff \xe4 " , "\\ xc3\\ xb4\\ xff\\ xe4" ),
@@ -289,7 +283,6 @@ def test_class_or_function_idval(self):
289
283
"""unittest for the expected behavior to obtain ids for parametrized
290
284
values that are classes or functions: their __name__.
291
285
"""
292
- from _pytest .python import _idval
293
286
294
287
class TestClass :
295
288
pass
0 commit comments