Skip to content

Commit

Permalink
Diagnostic test requires clean diag_table to start. Closes #142
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Hannah committed Aug 14, 2017
1 parent e26ee25 commit b65e244
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions tools/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os

import pytest
import subprocess as sp
from dump_all_diagnostics import dump_diags
from experiment import create_experiments, exp_id_from_path

Expand Down Expand Up @@ -47,6 +48,10 @@ def exp(request):
"""
exp = request.param

# Make sure that the experiment has the original diag_table
diag_table = os.path.join(exp.path, 'diag_table')
sp.check_call(['git', 'checkout', diag_table])

# Run the experiment to get latest code changes, and updates to the
# available_diags. This will do nothing if the experiment has already been
# run.
Expand Down Expand Up @@ -80,14 +85,6 @@ def exp_diags_not_dumped():
return exp


def restore_after_test():
"""
Restore experiment state after running a test.
- The diag_table files needs to be switched back (?)
"""
pass

@pytest.fixture(scope='module')
def prepare_to_test():
"""
Expand Down

0 comments on commit b65e244

Please sign in to comment.