Skip to content

Commit 90ccb4f

Browse files
authored
test: fix None comparisons (#1963)
`flake8` will eventually complain about this when the `flakeheaven` baseline is invalidated.
1 parent 496bc55 commit 90ccb4f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test/jsonld/test_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def test_ignore_base_remote_context():
196196
ctx_url = "http://example.org/remote-base.jsonld"
197197
SOURCES[ctx_url] = {"@context": {"@base": "/remote"}}
198198
ctx = Context(ctx_url)
199-
assert ctx.base == None
199+
assert ctx.base is None
200200

201201

202202
@_expect_exception(errors.RECURSIVE_CONTEXT_INCLUSION)

test/test_namespace/test_namespace.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,19 +267,19 @@ def test_expand_curie_exception_messages(self) -> None:
267267
g = Graph()
268268

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

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

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

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

285285
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)