Test that doctests which output unicode fail in Python 2 when the ALLOW_UNICODE option is not used. The same test should pass in Python 3.
(self, pytester: Pytester)
| 912 | reprec.assertoutcome(passed=2) |
| 913 | |
| 914 | def test_unicode_string(self, pytester: Pytester): |
| 915 | """Test that doctests which output unicode fail in Python 2 when |
| 916 | the ALLOW_UNICODE option is not used. The same test should pass |
| 917 | in Python 3. |
| 918 | """ |
| 919 | pytester.maketxtfile( |
| 920 | test_doc=""" |
| 921 | >>> b'12'.decode('ascii') |
| 922 | '12' |
| 923 | """ |
| 924 | ) |
| 925 | reprec = pytester.inline_run() |
| 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 |
nothing calls this directly
no test coverage detected