#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,16 +1,16 @@
from nose.tools import assert_equal, assert_raises
import unittest
class TestAssignCookie(object):
class TestAssignCookie(unittest.TestCase):
def test_assign_cookie(self):
solution = Solution()
assert_raises(TypeError, solution.find_content_children, None, None)
assert_equal(solution.find_content_children([1, 2, 3],
self.assertRaises(TypeError, solution.find_content_children, None, None)
self.assertEqual(solution.find_content_children([1, 2, 3],
[1, 1]), 1)
assert_equal(solution.find_content_children([1, 2],
self.assertEqual(solution.find_content_children([1, 2],
[1, 2, 3]), 2)
assert_equal(solution.find_content_children([7, 8, 9, 10],
self.assertEqual(solution.find_content_children([7, 8, 9, 10],
[5, 6, 7, 8]), 2)
print('Success: test_find_content_children')
@@ -21,4 +21,4 @@ def main():
if __name__ == '__main__':
main()
main()