No windows 10, utilizando o pycharm, ao tentar no venv o comando pytest -v retorna erro com pytest.raises(Exception):
(venv) PS C:\Users\Amilcar Joel Simm\PycharmProjects\tdd> pytest -v============================================================================== test session starts =============================================================================== platform win32 -- Python 3.11.3, pytest-7.4.0, pluggy-1.2.0 -- C:\Users\Amilcar Joel Simm\PycharmProjects\tdd\venv\Scripts\python.exe cachedir: .pytest_cache rootdir: C:\Users\Amilcar Joel Simm\PycharmProjects\tdd collected 5 items / 5 errors
===================================================================================== ERRORS ===================================================================================== _________________________________________________________ ERROR collecting Lib/site-packages/colorama/tests/ansi_test.py _________________________________________________________ import file mismatch: imported module 'colorama.tests.ansi_test' has this file attribute: C:\Users\Amilcar Joel Simm\PycharmProjects\tdd\venv\Lib\site-packages\colorama\tests\ansi_test.py which is not the same as the test file we want to collect: C:\Users\Amilcar Joel Simm\PycharmProjects\tdd\Lib\site-packages\colorama\tests\ansi_test.py HINT: remove pycache / .pyc files and/or use a unique basename for your test file modules _____________________________________________________ ERROR collecting Lib/site-packages/colorama/tests/ansitowin32_test.py ______________________________________________________ import file mismatch: imported module 'colorama.tests.ansitowin32_test' has this file attribute: C:\Users\Amilcar Joel Simm\PycharmProjects\tdd\venv\Lib\site-packages\colorama\tests\ansitowin32_test.py which is not the same as the test file we want to collect: C:\Users\Amilcar Joel Simm\PycharmProjects\tdd\Lib\site-packages\colorama\tests\ansitowin32_test.py HINT: remove pycache / .pyc files and/or use a unique basename for your test file modules ______________________________________________________ ERROR collecting Lib/site-packages/colorama/tests/initialise_test.py ______________________________________________________ import file mismatch: imported module 'colorama.tests.initialise_test' has this file attribute: C:\Users\Amilcar Joel Simm\PycharmProjects\tdd\venv\Lib\site-packages\colorama\tests\initialise_test.py which is not the same as the test file we want to collect: C:\Users\Amilcar Joel Simm\PycharmProjects\tdd\Lib\site-packages\colorama\tests\initialise_test.py HINT: remove pycache / .pyc files and/or use a unique basename for your test file modules ________________________________________________________ ERROR collecting Lib/site-packages/colorama/tests/isatty_test.py ________________________________________________________ import file mismatch: imported module 'colorama.tests.isatty_test' has this file attribute: C:\Users\Amilcar Joel Simm\PycharmProjects\tdd\venv\Lib\site-packages\colorama\tests\isatty_test.py which is not the same as the test file we want to collect: C:\Users\Amilcar Joel Simm\PycharmProjects\tdd\Lib\site-packages\colorama\tests\isatty_test.py HINT: remove pycache / .pyc files and/or use a unique basename for your test file modules _______________________________________________________ ERROR collecting Lib/site-packages/colorama/tests/winterm_test.py ________________________________________________________ import file mismatch: imported module 'colorama.tests.winterm_test' has this file attribute: C:\Users\Amilcar Joel Simm\PycharmProjects\tdd\venv\Lib\site-packages\colorama\tests\winterm_test.py which is not the same as the test file we want to collect: C:\Users\Amilcar Joel Simm\PycharmProjects\tdd\Lib\site-packages\colorama\tests\winterm_test.py HINT: remove pycache / .pyc files and/or use a unique basename for your test file modules ============================================================================ short test summary info ============================================================================= ERROR Lib/site-packages/colorama/tests/ansi_test.py ERROR Lib/site-packages/colorama/tests/ansitowin32_test.py ERROR Lib/site-packages/colorama/tests/initialise_test.py ERROR Lib/site-packages/colorama/tests/isatty_test.py ERROR Lib/site-packages/colorama/tests/winterm_test.py !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 5 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! =============================================================================== 5 errors in 0.68s ================================================================================