fixed pylint warnings
Change-Id: Ibb3da77e9a53b7293a280659defc029416e30e3b
This commit is contained in:

committed by
Enrico Faulhaber

parent
a928c95efd
commit
c1eb764b09
@ -15,7 +15,7 @@ def constants():
|
||||
del c
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
# pylint: disable=redefined-builtin
|
||||
@pytest.fixture(scope="session")
|
||||
def globals():
|
||||
return dict()
|
||||
return {}
|
||||
|
@ -108,7 +108,7 @@ def test_handler():
|
||||
assert m.read_b() == 7
|
||||
assert data.pop() == 'b'
|
||||
|
||||
assert data == []
|
||||
assert not data
|
||||
|
||||
|
||||
def test_common_handler():
|
||||
@ -137,7 +137,7 @@ def test_common_handler():
|
||||
assert m.a == 3
|
||||
assert m.b == 2
|
||||
assert data.pop() == 'write_hdl'
|
||||
assert m.writeDict == {}
|
||||
assert not m.writeDict
|
||||
|
||||
m.write_b(4)
|
||||
assert m.a == 3
|
||||
@ -159,7 +159,7 @@ def test_common_handler():
|
||||
assert m.b == 2.2
|
||||
assert data.pop() == 'read_hdl'
|
||||
|
||||
assert data == []
|
||||
assert not data
|
||||
|
||||
|
||||
def test_nopoll():
|
||||
|
@ -49,7 +49,7 @@ def test_EnumMember():
|
||||
a += 2
|
||||
|
||||
# this shall work
|
||||
assert 2 == (a + 1) # pylint: disable=C0122
|
||||
assert 2 == (a + 1)
|
||||
assert (a - 1) == 0
|
||||
assert a
|
||||
assert a + a
|
||||
|
@ -54,6 +54,7 @@ class Connection:
|
||||
|
||||
@pytest.fixture(name='init')
|
||||
def init_(monkeypatch):
|
||||
# pylint: disable=unnecessary-dunder-call
|
||||
logger.__init__()
|
||||
|
||||
class Playground:
|
||||
|
@ -542,7 +542,7 @@ def test_generic_access():
|
||||
assert obj.read_unhandled()
|
||||
assert updates == {'obj': {'param': 'potato'}}
|
||||
updates.clear()
|
||||
assert updates == {}
|
||||
assert not updates
|
||||
|
||||
|
||||
def test_duplicate_handler_name():
|
||||
|
@ -40,7 +40,7 @@ MSG = [
|
||||
[(m.EVENTREPLY, 'mod:par', [123, dict(t=12.25)]), b'update mod:par [123, {"t": 12.25}]'],
|
||||
[(m.HEARTBEATREQUEST, '0', None), b'ping 0'],
|
||||
[(m.HEARTBEATREPLY, None, [None, dict(t=11.75)]), b'pong [null, {"t": 11.75}]'],
|
||||
[(m.ERRORPREFIX + m.WRITEREQUEST, 'm:p', ['ErrClass', 'text', dict()]),
|
||||
[(m.ERRORPREFIX + m.WRITEREQUEST, 'm:p', ['ErrClass', 'text', {}]),
|
||||
b'error_change m:p ["ErrClass", "text", {}]'],
|
||||
]
|
||||
@pytest.mark.parametrize('msg, line', MSG)
|
||||
|
Reference in New Issue
Block a user