A file which may contain Python tests was detected in the ... workspace, but the test framework is disabled

Viewed 175

I'm working in Visual Studio Community 2019 v. 16.9.3. I'm on Windows 10. I recently starting getting this message in Visual Studio.

A file which may contain Python tests was detected in the ... workspace, but the test framework is disabled

enter image description here

If I close it out it doesn't seem to have any effect on any of my scripts. But, every time I start up Visual Studio and choose the folder to work from where my python 3x scripts reside I get this message.

I also have a few python environments to choose from. If I switch between environments the message doesn't go away.

I'm wondering if clicking "Don't show this message again" is the best option. As far as I know I've never used pytest or unittest for that matter, nor am I even sure how to implement them. The programs I write are pretty much used for simple automation.

1 Answers

I also started getting the same notification once I created a Python project that contained "Test" in the project name.

After searching a little bit I found that two testing frameworks, namely pytest and unittest, are supported for Python in Visual Studio from version 16.3.

You can set up unit testing anytime, hence, if you don't wish it now you can select "Don't show this message again". More details are at: Set up unit testing for Python code

Related