Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run all tests in a large number of tests. #7984

Open
ttSpace opened this issue Aug 20, 2024 · 0 comments
Open

Cannot run all tests in a large number of tests. #7984

ttSpace opened this issue Aug 20, 2024 · 0 comments
Assignees

Comments

@ttSpace
Copy link

ttSpace commented Aug 20, 2024

Describe the bug

image

Steps to Reproduce

  1. "New Project->Python->From Existing Python code" to bring up dialog
  2. Select a folder that contains multiple tests.
    (Note: You can copy tests from the python distribution /lib/test, such as C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64\Lib\test
  3. Open a "test_*.py" file to enable unittest.
  4. Wait for tests to be discovered and run all tests.

Expected behavior

All tests should load and run successfully.

Additional context and screenshots

Some tests did not run. Tests that have not been run can be run separately.

image

Logs

Output for Tests in the Output panel

Log level is set to Informational (Default).
Connected to test environment '< Local Windows Environment >'
Source code repository not available. Some features may not work as expected.
Test data store opened in 0.005 sec.
========== Starting test discovery ==========
Starting unittest discovery for the Folder4 project. This can take up to 60 seconds.
cd C:\Users\vting\source\repos\Folder4\
set PYTHONPATH=C:\Users\vting\source\repos\Folder4\
C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64\python.exe C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\PREVIEW\COMMON7\IDE\EXTENSIONS\MICROSOFT\PYTHON\CORE\PythonFiles\testing_tools\run_adapter.py discover unittest --output-file C:\Users\vting\AppData\Local\Temp\tmp3469.tmp -- . test*.py
========== Test discovery finished: 1295 Tests found in 4.9 sec ==========
========== Starting test run ==========
cd C:\Users\vting\source\repos\Folder4\
set PYTHONPATH=C:\Users\vting\source\repos\Folder4;C:\Users\vting\source\repos\Folder4\
"C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64\python.exe" "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\PREVIEW\COMMON7\IDE\EXTENSIONS\MICROSOFT\PYTHON\CORE\visualstudio_py_testlauncher.py" --test-list C:\Users\vting\AppData\Local\Temp\tmp6D4B.tmp -r 59071
Connected to socket
Connection event fired
Traceback (most recent call last):
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64\lib\unittest\case.py", line 59, in testPartExecutor
    yield
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64\lib\unittest\case.py", line 592, in run
    self._callTestMethod(testMethod)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64\lib\unittest\case.py", line 550, in _callTestMethod
    method()
  File "C:\Users\vting\source\repos\Folder4\test_baseexception.py", line 31, in test_inheritance
    inheritance_tree = open(os.path.join(os.path.split(__file__)[0],
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\vting\\source\\repos\\Folder4\\exception_hierarchy.txt'
AVAILABLE_TARGETS = []
EXPECTED_C_LOCALE_EQUIVALENTS = ['C', 'invalid.ascii']
EXPECTED_C_LOCALE_STREAM_ENCODING = 'ascii'
EXPECTED_C_LOCALE_FS_ENCODING = 'ascii'
EXPECT_COERCION_IN_DEFAULT_LOCALE = True
_C_UTF8_LOCALES = ('C.UTF-8', 'C.utf8', 'UTF-8')
_check_nl_langinfo_CODESET = False
========== Test run finished: 518 Tests (505 Passed, 1 Failed, 12 Skipped) run in 23.1 sec ==========

Tests.zip

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

No branches or pull requests

2 participants