def test_no_match_context(current_context): """A context doesn't match if it is not "within" the pattern context.""" assert not adventurelib._match_context('foo', current_context)
def test_match_context_none(): """The current context matches if the pattern context is None.""" assert adventurelib._match_context(None, 'foo.bar')
def test_match_context(current_context): """We can match contexts.""" assert adventurelib._match_context('foo', current_context)