Skip to content

Commit

Permalink
reset disable flag again after test
Browse files Browse the repository at this point in the history
  • Loading branch information
mschrimpf committed Jun 21, 2019
1 parent 033fd10 commit d798431
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test___init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ def __repr__(self):
assert c.f(1) == 1

def test_disable_store(self):
previous_disable_value = os.getenv('RESULTCACHING_DISABLE', '0')
with tempfile.TemporaryDirectory() as storage_dir:
os.environ['RESULTCACHING_HOME'] = storage_dir
os.environ['RESULTCACHING_DISABLE'] = '1'
Expand All @@ -215,6 +216,8 @@ def func(x):
assert func(1) == 1
assert function_calls == 2

os.environ['RESULTCACHING_DISABLE'] = previous_disable_value


class TestCache:
def test(self):
Expand Down

0 comments on commit d798431

Please sign in to comment.