Commit bdad106a authored by Michal Čihař's avatar Michal Čihař

Do not change type on init

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 1a345a51
...@@ -95,10 +95,10 @@ class CheckTestCase(TestCase): ...@@ -95,10 +95,10 @@ class CheckTestCase(TestCase):
self.test_empty = ('', '', '') self.test_empty = ('', '', '')
self.test_good_matching = ('string', 'string', '') self.test_good_matching = ('string', 'string', '')
self.test_good_none = ('string', 'string', '') self.test_good_none = ('string', 'string', '')
self.test_good_ignore = None self.test_good_ignore = ()
self.test_failure_1 = None self.test_failure_1 = ()
self.test_failure_2 = None self.test_failure_2 = ()
self.test_failure_3 = None self.test_failure_3 = ()
self.test_ignore_check = ( self.test_ignore_check = (
'x', 'x', self.check.ignore_string if self.check else '' 'x', 'x', self.check.ignore_string if self.check else ''
) )
...@@ -107,7 +107,7 @@ class CheckTestCase(TestCase): ...@@ -107,7 +107,7 @@ class CheckTestCase(TestCase):
''' '''
Performs single check if we have data to test. Performs single check if we have data to test.
''' '''
if data is None or self.check is None: if not data or self.check is None:
return return
result = self.check.check_single( result = self.check.check_single(
data[0], data[0],
...@@ -169,7 +169,7 @@ class CheckTestCase(TestCase): ...@@ -169,7 +169,7 @@ class CheckTestCase(TestCase):
) )
def test_check_failure_1_singular(self): def test_check_failure_1_singular(self):
if self.test_failure_1 is None or self.check is None: if not self.test_failure_1 or self.check is None:
return return
self.assertTrue( self.assertTrue(
self.check.check_target( self.check.check_target(
...@@ -180,7 +180,7 @@ class CheckTestCase(TestCase): ...@@ -180,7 +180,7 @@ class CheckTestCase(TestCase):
) )
def test_check_failure_1_plural(self): def test_check_failure_1_plural(self):
if self.test_failure_1 is None or self.check is None: if not self.test_failure_1 or self.check is None:
return return
self.assertTrue( self.assertTrue(
self.check.check_target( self.check.check_target(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment