Skip to content

Commit

Permalink
fix: jscpd: Clone found
Browse files Browse the repository at this point in the history
  • Loading branch information
jhutar committed Nov 9, 2023
1 parent a4dd113 commit e1fedf5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/test_status_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,21 +210,21 @@ def test_set_subtree_json(self):
with tempfile.NamedTemporaryFile(delete=False, suffix=".json") as f:
f_name = f.name
f.write(b'{"hello":"world","foo":42,"bar":{"baz":1}}')
self.status_data.set_subtree_json("results.xxx", f_name)
self.status_data.set_subtree_json("results.xxx_json", f_name)
os.unlink(f_name)
self.assertEqual(self.status_data.get("results.xxx.hello"), "world")
self.assertEqual(self.status_data.get("results.xxx.foo"), 42)
self.assertEqual(self.status_data.get("results.xxx.bar.baz"), 1)
self.assertEqual(self.status_data.get("results.xxx_json.hello"), "world")
self.assertEqual(self.status_data.get("results.xxx_json.foo"), 42)
self.assertEqual(self.status_data.get("results.xxx_json.bar.baz"), 1)

def test_set_subtree_yaml(self):
with tempfile.NamedTemporaryFile(delete=False, suffix=".yaml") as f:
f_name = f.name
f.write(b"hello: world\nfoo: 42\nbar:\n baz: 1")
self.status_data.set_subtree_json("results.xxx", f_name)
self.status_data.set_subtree_json("results.xxx_yaml", f_name)
os.unlink(f_name)
self.assertEqual(self.status_data.get("results.xxx.hello"), "world")
self.assertEqual(self.status_data.get("results.xxx.foo"), 42)
self.assertEqual(self.status_data.get("results.xxx.bar.baz"), 1)
self.assertEqual(self.status_data.get("results.xxx_yaml.hello"), "world")
self.assertEqual(self.status_data.get("results.xxx_yaml.foo"), 42)
self.assertEqual(self.status_data.get("results.xxx_yaml.bar.baz"), 1)

def test_remove_simple(self):
self.status_data.set("results.xxx", "should not be here")
Expand Down

0 comments on commit e1fedf5

Please sign in to comment.