Don't ignore missing/unreadable files in test cases (pylint)
This commit is contained in:
3
tests.py
3
tests.py
@ -46,7 +46,6 @@ class YAMLTest(unittest.TestCase):
|
||||
test = None
|
||||
cfg = None
|
||||
ncount = 0
|
||||
try:
|
||||
with open(self.yaml_filename, "r", encoding="utf-8") as file:
|
||||
for data in yaml.load_all(file, Loader=yaml.Loader):
|
||||
if ncount == 0:
|
||||
@ -55,8 +54,6 @@ class YAMLTest(unittest.TestCase):
|
||||
elif ncount == 1:
|
||||
cfg = data
|
||||
ncount += 1
|
||||
except:
|
||||
pass
|
||||
self.assertEqual(ncount, 2)
|
||||
self.assertIsNotNone(test)
|
||||
if not cfg:
|
||||
|
Reference in New Issue
Block a user