Skip to content

Commit

Permalink
Test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ramedina86 committed Feb 2, 2024
1 parent da729ce commit 7666a53
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,19 @@ def test_mutations(self) -> None:

self.sp["age"] = 2
m = self.sp.get_mutations_as_dict()
assert m.get("age") == 2
assert m.get("+age") == 2
assert len(m) == 1

self.sp["interests"] += ["dogs"]
self.sp["features"]["height"] = "short"
m = self.sp.get_mutations_as_dict()
assert m.get("interests") == ["lamps", "cars", "dogs"]
assert m.get("features.height") == "short"
assert m.get("+interests") == ["lamps", "cars", "dogs"]
assert m.get("+features.height") == "short"
assert len(m) == 2

self.sp["state.with.dots"]["photo.jpeg"] = "Corrupted"
m = self.sp.get_mutations_as_dict()
assert m.get("state\\.with\\.dots.photo\\.jpeg") == "Corrupted"
assert m.get("+state\\.with\\.dots.photo\\.jpeg") == "Corrupted"
assert len(m) == 1

self.sp["new.state.with.dots"] = {"test": "test"}
Expand All @@ -113,8 +113,6 @@ def test_mutations(self) -> None:
m = self.sp.get_mutations_as_dict()

assert m.get("+age") == 2
assert m.get("+features.height") == "short"
assert m.get("+state\\.with\\.dots.photo\\.jpeg") == "Corrupted"

del self.sp["best_feature"]
m = self.sp.get_mutations_as_dict()
Expand Down

0 comments on commit 7666a53

Please sign in to comment.