Skip to content

testing/python/metafunc.py: import _idval once #6245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions testing/python/metafunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import pytest
from _pytest import fixtures
from _pytest import python
from _pytest.python import _idval


class TestMetafunc:
Expand Down Expand Up @@ -209,8 +210,6 @@ class A:
deadline=400.0
) # very close to std deadline and CI boxes are not reliable in CPU power
def test_idval_hypothesis(self, value):
from _pytest.python import _idval

escaped = _idval(value, "a", 6, None, item=None, config=None)
assert isinstance(escaped, str)
escaped.encode("ascii")
Expand All @@ -221,8 +220,6 @@ def test_unicode_idval(self):
escapes if they're not.

"""
from _pytest.python import _idval

values = [
("", ""),
("ascii", "ascii"),
Expand All @@ -242,7 +239,6 @@ def test_unicode_idval_with_config(self):
disable_test_id_escaping_and_forfeit_all_rights_to_community_support
option. (#5294)
"""
from _pytest.python import _idval

class MockConfig:
def __init__(self, config):
Expand Down Expand Up @@ -274,8 +270,6 @@ def test_bytes_idval(self):
"binary escape", where any byte < 127 is escaped into its hex form.
- python3: bytes objects are always escaped using "binary escape".
"""
from _pytest.python import _idval

values = [
(b"", ""),
(b"\xc3\xb4\xff\xe4", "\\xc3\\xb4\\xff\\xe4"),
Expand All @@ -289,7 +283,6 @@ def test_class_or_function_idval(self):
"""unittest for the expected behavior to obtain ids for parametrized
values that are classes or functions: their __name__.
"""
from _pytest.python import _idval

class TestClass:
pass
Expand Down