CleanCut / green

Green is a clean, colorful, fast python test runner.
MIT License
785 stars 75 forks source link

Question: What is a "test" in context of --processes #253

Closed buhtz closed 2 years ago

buhtz commented 2 years ago

Citation from your README.md:

"Tests run in independent processes."

What exactly is a test here? Is it a class derived from unittest.TestCase or is it a method inside a TestCase derived class?

This is important to know for me because some TestCases need to run on one Thread only.

CleanCut commented 2 years ago

By default (assuming you don't specify a specific class or method as an argument to Green) Green sends an entire test suite to a process. A test suite is all of the tests in an entire python file.

Green will also create custom test suites out of individual items that you specify on the command-line. So if you specified mytestmodule.MyTestClass.my_test_method as an argument on the command line, then the my_test_method test would run by itself.

So, unless you do something unusual, just keep all of your tests that need to be run together in a single Python file.