I couldn’t get nose to work so i have been using pytest but i cant seem to get assert errors for some reason
anyone know what ive done wrong.
Yes, you are testing the wrong expressions. You write
assert lexicon.scan("north"), [("direction", "south")]
where Python simply converts the tuple to True
because it’s not empty. You need to do this instead:
assert lexicon.scan("north") == [("direction"), "south")]
I think these generice assertions are a little different from how nose works.
1 Like
cheers mate, thought id buggered up somewhere, thanks for clearing it up.