#273: Remove nose dependency for math_probability/ (#281)

This commit is contained in:
Donne Martin
2020-07-14 21:23:57 -04:00
committed by GitHub
parent 76cb6507fc
commit 67505c49b2
21 changed files with 212 additions and 280 deletions

View File

@@ -1,15 +1,15 @@
from nose.tools import assert_equal, assert_raises
import unittest
class TestMath(object):
class TestMath(unittest.TestCase):
def test_check_prime(self):
math = Math()
assert_raises(TypeError, math.check_prime, None)
assert_raises(TypeError, math.check_prime, 98.6)
assert_equal(math.check_prime(0), False)
assert_equal(math.check_prime(1), False)
assert_equal(math.check_prime(97), True)
self.assertRaises(TypeError, math.check_prime, None)
self.assertRaises(TypeError, math.check_prime, 98.6)
self.assertEqual(math.check_prime(0), False)
self.assertEqual(math.check_prime(1), False)
self.assertEqual(math.check_prime(97), True)
print('Success: test_check_prime')
@@ -19,4 +19,4 @@ def main():
if __name__ == '__main__':
main()
main()