source: test/ @ 1432:470345d921fd

Last change on this file since 1432:470345d921fd was 1432:470345d921fd, checked in by Stefan Schwarzer <sschwarzer@…>, 7 years ago
Make it possible to skip long-running tests. Set the environment variable `SKIP_LONG_RUNNING_TESTS` to "1" to skip the tests. Of course it's recommended to run all tests from time to time, at least before a release.
File size: 293 bytes
1import os
4def skip_long_running_test_condition():
5    """
6    Helper function to use with `unittest.skipIf`.
8    This requires either Python >= 2.7 or the standalonge `unittest2`
9    module.
10    """
11    skip_flag = os.environ.get("SKIP_LONG_RUNNING_TESTS", "0")
12    return skip_flag == "1"
Note: See TracBrowser for help on using the repository browser.