From a47ffa815bb2825133ca8255ee0ac8edff9c2b5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Fernando=20S=C3=A1nchez?= Date: Sat, 8 Dec 2018 20:49:34 +0100 Subject: [PATCH] Fix CI. Skip testing long examples --- .gitlab-ci.yml | 2 +- tests/test_examples.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7c5ae1e..067838b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,4 +18,4 @@ build: test: script: - python -m setup.py test \ No newline at end of file + python setup.py test \ No newline at end of file diff --git a/tests/test_examples.py b/tests/test_examples.py index 5c7e00f..671b6b0 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -17,6 +17,9 @@ def make_example_test(path, config): root = os.getcwd() os.chdir(os.path.dirname(path)) s = simulation.from_config(config) + iterations = s.max_time * s.num_trials + if iterations > 1000: + self.skipTest('This example would probably take too long') envs = s.run_simulation(dry_run=True) assert envs for env in envs: