Skip to content

Commit

Permalink
test: fix None comparisons (#1963)
Browse files Browse the repository at this point in the history
`flake8` will eventually complain about this when the `flakeheaven` baseline
is invalidated.
  • Loading branch information
aucampia committed May 21, 2022
1 parent 496bc55 commit 90ccb4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/jsonld/test_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def test_ignore_base_remote_context():
ctx_url = "http://example.org/remote-base.jsonld"
SOURCES[ctx_url] = {"@context": {"@base": "/remote"}}
ctx = Context(ctx_url)
assert ctx.base == None
assert ctx.base is None


@_expect_exception(errors.RECURSIVE_CONTEXT_INCLUSION)
Expand Down
8 changes: 4 additions & 4 deletions test/test_namespace/test_namespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,19 +267,19 @@ def test_expand_curie_exception_messages(self) -> None:
g = Graph()

with pytest.raises(TypeError) as e:
assert g.namespace_manager.expand_curie(URIRef("urn:example")) == None
assert g.namespace_manager.expand_curie(URIRef("urn:example")) is None
assert str(e.value) == "Argument must be a string, not URIRef."

with pytest.raises(TypeError) as e:
assert g.namespace_manager.expand_curie(Literal("rdf:type")) == None
assert g.namespace_manager.expand_curie(Literal("rdf:type")) is None
assert str(e.value) == "Argument must be a string, not Literal."

with pytest.raises(TypeError) as e:
assert g.namespace_manager.expand_curie(BNode()) == None
assert g.namespace_manager.expand_curie(BNode()) is None
assert str(e.value) == "Argument must be a string, not BNode."

with pytest.raises(TypeError) as e:
assert g.namespace_manager.expand_curie(Graph()) == None
assert g.namespace_manager.expand_curie(Graph()) is None
assert str(e.value) == "Argument must be a string, not Graph."

@pytest.mark.parametrize(
Expand Down

0 comments on commit 90ccb4f

Please sign in to comment.