GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still and

Commit 89efc2b6 authored by juga  's avatar juga
Browse files

fix: tests: Test state file consistency

Test that two different instances of state don't overwrite each other.
This test don't past in this commit, will pass in the next bugfix.

Bugfix v0.7.0, which claimed 100% test coverage on state.
parent 3cbba222
......@@ -117,3 +117,12 @@ def test_state_iter(tmpdir):
for key in d:
state[key] = d[key]
assert set([key for key in state]) == set(d)
def test_two_instances(tmpdir):
"""Test that 2 different intances don't overwrite each other"""
s1 = State(os.path.join(str(tmpdir), 'state.dat'))
s2 = State(os.path.join(str(tmpdir), 'state.dat'))
s1["x"] = "foo"
s2["y"] = "bar"
assert s2["x"] == "foo"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment