fix: fix 'inconsistent-return-statements' for pylint
This commit is contained in:
parent
4f6229e5d9
commit
2fcff6b2a4
16 changed files with 43 additions and 9 deletions
|
@ -27,6 +27,10 @@ else:
|
|||
batch = MyBatch(id=42, uuid=_uuid.UUID('0675cdac-ffc9-7690-8000-6023de1c8cfd'))
|
||||
self.assertEqual(repr(batch), "MyBatch(uuid=UUID('0675cdac-ffc9-7690-8000-6023de1c8cfd'))")
|
||||
self.assertEqual(str(batch), "00000042")
|
||||
self.assertEqual(batch.id_str, "00000042")
|
||||
|
||||
batch2 = MyBatch()
|
||||
self.assertIsNone(batch2.id_str)
|
||||
|
||||
|
||||
class TestBatchRowMixin(DataTestCase):
|
||||
|
|
|
@ -22,9 +22,11 @@ else:
|
|||
def test_dict_behavior(self):
|
||||
setting = Setting()
|
||||
self.assertEqual(list(iter(setting)), [('name', None), ('value', None)])
|
||||
self.assertIsNone(setting.name)
|
||||
self.assertIsNone(setting['name'])
|
||||
setting.name = 'foo'
|
||||
self.assertEqual(setting['name'], 'foo')
|
||||
self.assertRaises(KeyError, lambda: setting['notfound'])
|
||||
|
||||
|
||||
class TestUUID(TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue