コード例 #1
0
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)
コード例 #2
0
def test_match_context_none():
    """The current context matches if the pattern context is None."""
    assert adventurelib._match_context(None, 'foo.bar')
コード例 #3
0
def test_match_context(current_context):
    """We can match contexts."""
    assert adventurelib._match_context('foo', current_context)