Disable detection of tests by file name
How do I prevent the behavior where a Python script with the word test in the name is assumed to be a Python test and instead of being able to run it normally, it is run as a test?
Please sign in to leave a comment.
Hello,
PyCharm suggests running scripts as pure Python if no special "test" syntax is found, e.g. test_* functions and so on. It does not depend on the file name, in 2021.3 version.
You can use Run | Run... action which suggest to choose between "as test" and "as script" execution.