replace everywhere: 'is [not] None' -> '(==|!=) None'

This commit is contained in:
Joeri Exelmans 2024-09-04 09:50:30 +02:00
parent 3ae35a87d0
commit ec1a9dbfca
28 changed files with 690 additions and 668 deletions

View file

@ -3,7 +3,7 @@ import pytest
@pytest.mark.usefixtures("state")
def test_read_dict_node_no_exists(state):
assert state.read_dict_node(-1, "abc") is None
assert state.read_dict_node(-1, "abc") == None
@pytest.mark.usefixtures("state")
@ -11,21 +11,21 @@ def test_read_dict_node_not_found_edge(state):
a = state.create_node()
b = state.create_node()
c = state.create_edge(a, b)
assert a is not None
assert b is not None
assert c is not None
assert a != None
assert b != None
assert c != None
# Passing data is not enforced, as the data will be interpreted if necessary
assert state.read_dict_node(c, "abc") is None
assert state.read_dict_node(c, "abc") == None
@pytest.mark.usefixtures("state")
def test_read_dict_node_no_primitive(state):
a = state.create_node()
assert a is not None
assert a != None
# Passing data is not enforced, as the data will be interpreted if necessary
assert state.read_dict_node(a, a) is None
assert state.read_dict_node(a, a) == None
@pytest.mark.usefixtures("state")
@ -35,11 +35,11 @@ def test_read_dict_node_node_simple(state):
c = state.create_node()
d = state.create_edge(a, b)
e = state.create_edge(d, c)
assert a is not None
assert b is not None
assert c is not None
assert d is not None
assert e is not None
assert a != None
assert b != None
assert c != None
assert d != None
assert e != None
l = state.read_dict_node(a, c)
assert l == b
@ -52,20 +52,20 @@ def test_read_dict_node_multi(state):
c = state.create_node()
d = state.create_edge(a, b)
e = state.create_edge(d, c)
assert a is not None
assert b is not None
assert c is not None
assert d is not None
assert e is not None
assert a != None
assert b != None
assert c != None
assert d != None
assert e != None
g = state.create_node()
h = state.create_node()
i = state.create_edge(a, g)
j = state.create_edge(i, h)
assert g is not None
assert h is not None
assert i is not None
assert j is not None
assert g != None
assert h != None
assert i != None
assert j != None
l = state.read_dict_node(a, c)
assert l == b