mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-06 02:13:15 +08:00
Travis CI: Don’t allow bare exceptions (#1734)
* Travis CI: Don’t allow bare exceptions * fixup! Format Python code with psf/black push * except IOError: * except IOError: * Update hamming_code.py * IndexError * Get rid of the nonsense logic Co-authored-by: John Law <johnlaw.po@gmail.com>
This commit is contained in:
@ -19,11 +19,7 @@ class Test(unittest.TestCase):
|
||||
x = Vector([1, 2, 3])
|
||||
self.assertEqual(x.component(0), 1)
|
||||
self.assertEqual(x.component(2), 3)
|
||||
try:
|
||||
y = Vector()
|
||||
self.assertTrue(False)
|
||||
except:
|
||||
self.assertTrue(True)
|
||||
y = Vector()
|
||||
|
||||
def test_str(self):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user