Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mayhem committed Jan 30, 2024
1 parent 3389992 commit a0887f7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ def test_opts(self):
r = pp.parse("stats:(mr_monkey)::month")
print(r[0])
assert r[0] == {"entity": "stats", "values": ["mr_monkey"], "weight": 1, "opts": ["month"]}
r = pp.parse("stats:(mr_monkey)::month,easy")
assert r[0] == {"entity": "stats", "values": ["mr_monkey"], "weight": 1, "opts": ["month", "easy"]}
r = pp.parse("artist:(monkey)::nosim,easy")
assert r[0] == {"entity": "artist", "values": ["monkey"], "weight": 1, "opts": ["nosim", "easy"]}

self.assertRaises(ParseError, pp.parse, 'artist:(meh)::nosim,')

Expand Down Expand Up @@ -125,8 +125,8 @@ def test_stats(self):
r = pp.parse("stats:rob:1:week")
assert r[0] == {"entity": "stats", "values": ["rob"], "weight": 1, "opts": ["week"]}

r = pp.parse("stats:(mr_monkey)::month,nosim")
assert r[0] == {"entity": "stats", "values": ["mr_monkey"], "weight": 1, "opts": ["month", "nosim"]}
r = pp.parse("stats:(mr_monkey)::month")
assert r[0] == {"entity": "stats", "values": ["mr_monkey"], "weight": 1, "opts": ["month"]}

r = pp.parse("stats:(mr_monkey):2:month")
assert r[0] == {"entity": "stats", "values": ["mr_monkey"], "weight": 2, "opts": ["month"]}
Expand Down

0 comments on commit a0887f7

Please sign in to comment.