X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2Fhelper.py;fp=tests%2Fhelper.py;h=b85bf3ac58d8967edf0c7d691e3de2870b3f1374;hb=3080f31d1ee74104640dcff451922cd0ae88ee22;hp=4548b169f430ed0abbd6e78ddc1963171fc5e1c9;hpb=9fe90554ff1c8c7aea9e1e1e210419a845579edd;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FCryptoportfolio%2FTrader.git 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 from io import StringIO import portfolio, market, main, store -__all__ = ["unittest", "WebMockTestCase", "mock", "D", +__all__ = ["limits", "unittest", "WebMockTestCase", "mock", "D", "StringIO"] +limits = ["acceptance", "unit"] +for test_type in limits: + if "--no{}".format(test_type) in sys.argv: + sys.argv.remove("--no{}".format(test_type)) + limits.remove(test_type) + if "--only{}".format(test_type) in sys.argv: + sys.argv.remove("--only{}".format(test_type)) + limits = [test_type] + break + class WebMockTestCase(unittest.TestCase): import time