diff --git a/circle.yml b/circle.yml index 3ddc5fd6e..7443f5bc5 100644 --- a/circle.yml +++ b/circle.yml @@ -8,18 +8,18 @@ jobs: PIPENV_VENV_IN_PROJECT: true steps: - checkout -## - restore_cache: -## key: deps9-{{ .Branch }}-{{ checksum "Pipfile.lock" }} + - restore_cache: + key: deps9-{{ .Branch }}-{{ checksum "setup.py" }}-{{ checksum "integration_tests/setup.py" }} - run: command: | python -m virtualenv venv source venv/bin/activate - pip install ./integration_tests - pip install . --upgrade -## - save_cache: -## key: deps9-{{ .Branch }}-{{ checksum "Pipfile.lock" }} -## paths: -## - "venv" + pip install ./integration_tests --upgrade --upgrade-strategy only-if-needed + pip install . --upgrade --upgrade-strategy only-if-needed + - save_cache: + key: deps9-{{ .Branch }}-{{ checksum "setup.py" }}-{{ checksum "integration_tests/setup.py" }} + paths: + - "venv" - run: command: | source venv/bin/activate diff --git a/integration_tests/blockstack_integration_tests/live_tests/api_tests.py b/integration_tests/blockstack_integration_tests/live_tests/api_tests.py index cecc035ca..49f7c9bb4 100644 --- a/integration_tests/blockstack_integration_tests/live_tests/api_tests.py +++ b/integration_tests/blockstack_integration_tests/live_tests/api_tests.py @@ -28,7 +28,6 @@ import binascii import traceback import jsontokens -from test import test_support from binascii import hexlify from blockstack_client import schemas @@ -447,27 +446,7 @@ def test_main(args = []): for t in test_classes: test_map[t.__name__] = t - - with test_support.captured_stdout() as out: - try: - test_support.run_unittest(PingTest) - except Exception as e: - traceback.print_exc(file=sys.stdout) - out = out.getvalue() - if out[-3:-1] != "OK": - print(out) - print("Failure of the ping test means the rest of the unit tests will " + - "fail. Is the blockstack api daemon running? (did you run " + - "`blockstack api start`)") - sys.exit(1) - - if len(args) == 1 and args[0] == "--list": - print("Tests supported: ") - for testname in test_map.keys(): - print(testname) - return - - test_runner = test_support.run_unittest + test_runner = unittest.TextTestRunner(verbosity=2).run if "--xunit-path" in args: ainx = args.index("--xunit-path") @@ -476,6 +455,12 @@ def test_main(args = []): test_runner = XMLTestRunner(output=args[ainx]).run del args[ainx] + if len(args) == 1 and args[0] == "--list": + print("Tests supported: ") + for testname in test_map.keys(): + print(testname) + return + if "--api_password" in args: ainx = args.index("--api_password") del args[ainx]