You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an existing python project in visual studio 2019 (Version16.3.9) containing unit test created for unittest.py under visual studio 2017. I already configered the project for unittest, because this is needed in visual studio 2019. But there are no unit tests shown.
I got the following error in Output-Pane:
File "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\ENTERPRISE\COMMON7\IDE\EXTENSIONS\MICROSOFT\PYTHON\CORE\PythonFiles\testing_tools\run_adapter.py", line 17, in <module>
tool, cmd, subargs, toolargs = parse_args()
File "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\ENTERPRISE\COMMON7\IDE\EXTENSIONS\MICROSOFT\PYTHON\CORE\PythonFiles\testing_tools\adapter\__main__.py", line 81, in parse_args
subsub = add_subparser(cmdname, toolname, subsubs)
File "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\ENTERPRISE\COMMON7\IDE\EXTENSIONS\MICROSOFT\PYTHON\CORE\PythonFiles\testing_tools\adapter\__main__.py", line 26, in pytest_add_cli_subparser
from . import pytest
File "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\ENTERPRISE\COMMON7\IDE\EXTENSIONS\MICROSOFT\PYTHON\CORE\PythonFiles\testing_tools\adapter\pytest\__init__.py", line 7, in <module>
from ._discovery import discover
File "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\ENTERPRISE\COMMON7\IDE\EXTENSIONS\MICROSOFT\PYTHON\CORE\PythonFiles\testing_tools\adapter\pytest\_discovery.py", line 31, in <module>
patch_translate_non_printable()
File "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\ENTERPRISE\COMMON7\IDE\EXTENSIONS\MICROSOFT\PYTHON\CORE\PythonFiles\testing_tools\adapter\pytest\_discovery.py", line 15, in patch_translate_non_printable
translate_non_printable = getattr(_pytest.compat, "_translate_non_printable")
AttributeError: module '_pytest.compat' has no attribute '_translate_non_printable'
Whole Test-Output is attached.
Original Comments
Visual Studio Feedback System on 11/25/2019, 02:09 AM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Alexander Jäger on 11/25/2019, 11:33 PM:
When opening the same solution in Visual Studio 2017 (15.9.17) all the tests are shown and can be run.
Visual Studio Feedback System on 1/2/2020, 05:34 PM:
I have detected that for the last 35 days, this issue didn't have much product team activity and a very small amount of new votes or comments. Based on this, its severity, and affected area, it’s my experience that this issue is very unlikely to be fixed.
Bill Schnurr [MSFT] on 1/13/2020, 02:42 PM:
It appears you have pytest installed which is missing _pytest.compat.
If you only want to run unittest i suggest uninstalling pytest from your environment, or try updating to a newer version of pytest that includes _pytest.compat
Thank you
Bill Schnurr [MSFT] on 1/13/2020, 03:00 PM:
sorry I was mistaken. Your version of pytest does have "_pytest.compat" but what its missing is pytest.compat._translate_non_printable. Perhaps its an older version of pytest?
I'll update our script to handle this error better.
Thank you
Original Solutions
(no solutions)
The text was updated successfully, but these errors were encountered:
This issue has been moved from a ticket on Developer Community.
I have an existing python project in visual studio 2019 (Version16.3.9) containing unit test created for unittest.py under visual studio 2017. I already configered the project for unittest, because this is needed in visual studio 2019. But there are no unit tests shown.
I got the following error in Output-Pane:
Whole Test-Output is attached.
Original Comments
Visual Studio Feedback System on 11/25/2019, 02:09 AM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Alexander Jäger on 11/25/2019, 11:33 PM:
When opening the same solution in Visual Studio 2017 (15.9.17) all the tests are shown and can be run.
Visual Studio Feedback System on 1/2/2020, 05:34 PM:
I have detected that for the last 35 days, this issue didn't have much product team activity and a very small amount of new votes or comments. Based on this, its severity, and affected area, it’s my experience that this issue is very unlikely to be fixed.
Bill Schnurr [MSFT] on 1/13/2020, 02:42 PM:
It appears you have pytest installed which is missing _pytest.compat.
If you only want to run unittest i suggest uninstalling pytest from your environment, or try updating to a newer version of pytest that includes _pytest.compat
Thank you
Bill Schnurr [MSFT] on 1/13/2020, 03:00 PM:
sorry I was mistaken. Your version of pytest does have "_pytest.compat" but what its missing is pytest.compat._translate_non_printable. Perhaps its an older version of pytest?
I'll update our script to handle this error better.
Thank you
Original Solutions
(no solutions)
The text was updated successfully, but these errors were encountered: