1
0
mirror of https://github.com/gsi-upm/soil synced 2025-09-18 22:22:20 +00:00
This commit is contained in:
J. Fernando Sánchez
2019-02-19 21:17:19 +01:00
parent 65f6aa72f3
commit a3ea434f23
14 changed files with 414 additions and 335 deletions

View File

@@ -7,6 +7,8 @@ from soil import utils, simulation
ROOT = os.path.abspath(os.path.dirname(__file__))
EXAMPLES = join(ROOT, '..', 'examples')
FORCE_TESTS = os.environ.get('FORCE_TESTS', '')
class TestExamples(TestCase):
pass
@@ -19,7 +21,10 @@ def make_example_test(path, config):
s = simulation.from_config(config)
iterations = s.max_time * s.num_trials
if iterations > 1000:
self.skipTest('This example would probably take too long')
s.max_time = 100
s.num_trials = 1
if config.get('skip_test', False) and not FORCE_TESTS:
self.skipTest('Example ignored.')
envs = s.run_simulation(dry_run=True)
assert envs
for env in envs: