Skip to content

Some test modules fail when run as a script #104057

Closed
@Eclips4

Description

@Eclips4
 C:\Users\KIRILL-1\CLionProjects\cpython> ./python Lib/test/test_module.py
Running Debug|x64 interpreter...
.....................F..............
======================================================================
FAIL: test_module_repr_with_full_loader (__main__.ModuleTests.test_module_repr_with_full_loader)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_module.py", line 238, in test_module_repr_with_full_loader
    self.assertEqual(
AssertionError: "<module 'foo' (<class '__main__.FullLoader'>)>" != "<module 'foo' (<class 'test.test_module.FullLoader'>)>"      
- <module 'foo' (<class '__main__.FullLoader'>)>
?                        ^  ^^^^^
+ <module 'foo' (<class 'test.test_module.FullLoader'>)>
?                        ^^^^^^^^^  ^^^^^


----------------------------------------------------------------------
Ran 36 tests in 0.217s

FAILED (failures=1)

I'll soon send a PR to fix it.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    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