MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_bytes_literal

Method test_bytes_literal

testing/test_doctest.py:928–939  ·  view source on GitHub ↗

Test that doctests which output bytes fail in Python 3 when the ALLOW_BYTES option is not used. (#1287).

(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

926 reprec.assertoutcome(passed=1)
927
928 def test_bytes_literal(self, pytester: Pytester):
929 """Test that doctests which output bytes fail in Python 3 when
930 the ALLOW_BYTES option is not used. (#1287).
931 """
932 pytester.maketxtfile(
933 test_doc="""
934 >>> b'foo'
935 'foo'
936 """
937 )
938 reprec = pytester.inline_run()
939 reprec.assertoutcome(failed=1)
940
941 def test_number_re(self) -> None:
942 _number_re = _get_checker()._number_re # type: ignore

Callers

nothing calls this directly

Calls 3

assertoutcomeMethod · 0.80
maketxtfileMethod · 0.45
inline_runMethod · 0.45

Tested by

no test coverage detected