#273: Remove nose dependency for online_judges/ (#282)

This commit is contained in:
Donne Martin
2020-07-14 21:34:08 -04:00
committed by GitHub
parent 67505c49b2
commit 46d3939632
60 changed files with 575 additions and 782 deletions

View File

@@ -1,15 +1,15 @@
from nose.tools import assert_equal, assert_raises
import unittest
class TestMultOtherNumbers(object):
class TestMultOtherNumbers(unittest.TestCase):
def test_mult_other_numbers(self):
solution = Solution()
assert_raises(TypeError, solution.mult_other_numbers, None)
assert_equal(solution.mult_other_numbers([0]), [])
assert_equal(solution.mult_other_numbers([0, 1]), [1, 0])
assert_equal(solution.mult_other_numbers([0, 1, 2]), [2, 0, 0])
assert_equal(solution.mult_other_numbers([1, 2, 3, 4]), [24, 12, 8, 6])
self.assertRaises(TypeError, solution.mult_other_numbers, None)
self.assertEqual(solution.mult_other_numbers([0]), [])
self.assertEqual(solution.mult_other_numbers([0, 1]), [1, 0])
self.assertEqual(solution.mult_other_numbers([0, 1, 2]), [2, 0, 0])
self.assertEqual(solution.mult_other_numbers([1, 2, 3, 4]), [24, 12, 8, 6])
print('Success: test_mult_other_numbers')
@@ -19,4 +19,4 @@ def main():
if __name__ == '__main__':
main()
main()