Skip to content

test_inspect fails with --forever argument #107446

Description

@Eclips4

Traceback:

...many lines...
test_unwrap_several (test.test_inspect.TestUnwrap.test_unwrap_several) ... ok

======================================================================
ERROR: test_class_with_method_from_other_module (test.test_inspect.TestBuggyCases.test_class_with_method_from_other_module)       
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_inspect.py", line 992, in test_class_with_method_from_other_module  
    self.assertIn("correct", inspect.getsource(inspect_actual.A))
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\inspect.py", line 1317, in getsource
    lines, lnum = getsourcelines(object)
                  ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\inspect.py", line 1299, in getsourcelines
    lines, lnum = findsource(object)
                  ^^^^^^^^^^^^^^^^^^
  File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\inspect.py", line 1134, in findsource
    raise OSError('could not get source code')
OSError: could not get source code

----------------------------------------------------------------------
Ran 286 tests in 2.392s

FAILED (errors=1)
test test_inspect failed
test_inspect failed (1 error)

== Tests result: FAILURE ==

1 test OK.

1 test failed:
    test_inspect

Total duration: 7.2 sec
Tests result: FAILURE

Triend on current main.

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

3.13bugs and security fixesrelease-blockertestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions