Home > Software design >  Running python test suite from a python script (programmatrically)?
Running python test suite from a python script (programmatrically)?

Time:01-02

You can run the Python test suite (https://docs.python.org/3/library/test.html) from the command-line using:

$ python -m test

How do you run it from a python script?

import test

# test.run_all_tests() ???

CodePudding user response:

As taken from the __main__.py file:

from test.libregrtest import main
main()

Keep in mind using this outside of internal CPython development is discouraged as the code may change without notice.

  • Related