Skip to content

Commit

Permalink
Merge pull request #24 from vedangmehta/patch-5
Browse files Browse the repository at this point in the history
Unit test for Sieve of Eratosthenes.
  • Loading branch information
prakhar1989 committed Aug 10, 2015
2 parents e218d8e + b61fa57 commit 7444fcc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/sieve_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import unittest
from sieve_of_eratosthenes import calculate_primes

class TestSieveOfEratosthenes(unittest.TestCase):
def test_primes(self):
self.prime_list = [2,3,5,7,11,13,17,19]
self.assertEqual(self.prime_list,calculate_primes(20))

if __name__ == '__main__':
unittest.main()

0 comments on commit 7444fcc

Please sign in to comment.