Python unittest: how to run only part of a test file?
问题 I have a test file that contains tests taking quite a lot of time (they send calculations to a cluster and wait for the result). All of these are in specific TestCase class. Since they take time and furthermore are not likely to break, I'd want to be able to choose whether this subset of tests does or doesn't run (the best way would be with a command-line argument, ie " ./tests.py --offline " or something like that), so I could run most of the tests often and quickly and the whole set once in