Skip to content

Direct invocation of Lib/test/test_unittest/testmock/testpatch.py fails #115274

@sobolevn

Description

@sobolevn

Bug report

» ./python.exe Lib/test/test_unittest/testmock/testpatch.py
........................................................................................................F.....
======================================================================
FAIL: test_special_attrs (__main__.PatchTest.test_special_attrs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/sobolev/Desktop/cpython2/Lib/test/test_unittest/testmock/testpatch.py", line 1915, in test_special_attrs
    self.assertEqual(foo.__module__, 'test.test_unittest.testmock.testpatch')
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '__main__' != 'test.test_unittest.testmock.testpatch'
- __main__
+ test.test_unittest.testmock.testpatch

I have a PR ready.

Linked PRs

Metadata

Metadata

Assignees

Labels

testsTests 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