diff options
Diffstat (limited to 'tests/helper.py')
-rw-r--r-- | tests/helper.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/helper.py b/tests/helper.py index 4548b16..b85bf3a 100644 --- a/tests/helper.py +++ b/tests/helper.py | |||
@@ -6,9 +6,19 @@ import requests_mock | |||
6 | from io import StringIO | 6 | from io import StringIO |
7 | import portfolio, market, main, store | 7 | import portfolio, market, main, store |
8 | 8 | ||
9 | __all__ = ["unittest", "WebMockTestCase", "mock", "D", | 9 | __all__ = ["limits", "unittest", "WebMockTestCase", "mock", "D", |
10 | "StringIO"] | 10 | "StringIO"] |
11 | 11 | ||
12 | limits = ["acceptance", "unit"] | ||
13 | for test_type in limits: | ||
14 | if "--no{}".format(test_type) in sys.argv: | ||
15 | sys.argv.remove("--no{}".format(test_type)) | ||
16 | limits.remove(test_type) | ||
17 | if "--only{}".format(test_type) in sys.argv: | ||
18 | sys.argv.remove("--only{}".format(test_type)) | ||
19 | limits = [test_type] | ||
20 | break | ||
21 | |||
12 | class WebMockTestCase(unittest.TestCase): | 22 | class WebMockTestCase(unittest.TestCase): |
13 | import time | 23 | import time |
14 | 24 | ||