Skip to content

Direct invocation of test_pprint.py fails #111155

Closed
@sobolevn

Description

@sobolevn

Bug report

Before my fix:

» ./python.exe Lib/test/test_pprint.py                                   
..........F...............x.................
======================================================================
FAIL: test_dataclass_no_repr (__main__.QueryTestCase.test_dataclass_no_repr)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/sobolev/Desktop/cpython/Lib/test/test_pprint.py", line 538, in test_dataclass_no_repr
    self.assertRegex(formatted, r"<test.test_pprint.dataclass3 object at \w+>")
AssertionError: Regex didn't match: '<test.test_pprint.dataclass3 object at \\w+>' not found in '<__main__.dataclass3 object at 0x101847ad0>'

----------------------------------------------------------------------
Ran 44 tests in 0.058s

FAILED (failures=1, expected failures=1)

After:

» ./python.exe Lib/test/test_pprint.py
..........................x.................
----------------------------------------------------------------------
Ran 44 tests in 0.058s

OK (expected failures=1)              

Linked PRs

Metadata

Metadata

Assignees

Labels

stdlibPython modules in the Lib dirtestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions