Skip to content

Commit c27bfb9

Browse files
committed
remove example from unittest
1 parent 8aa05d4 commit c27bfb9

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

bitarray/test_util.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2307,22 +2307,6 @@ def test_bitwise_inplace(self):
23072307
c <<= n
23082308
self.assertEqual(ba2int(c), i << n)
23092309

2310-
def test_primes(self): # Sieve of Eratosthenes
2311-
sieve = ones(10000)
2312-
sieve[:2] = 0 # zero and one are not prime
2313-
for i in range(2, 100):
2314-
if sieve[i]:
2315-
sieve[i * i::i] = 0
2316-
# primes up to 40
2317-
self.assertEqual(list(sieve.search(1, 0, 40)),
2318-
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37])
2319-
# there are 1229 primes between 1 and 10000
2320-
self.assertEqual(sieve.count(1), 1229)
2321-
# there are 119 primes between 4000 and 5000
2322-
self.assertEqual(sieve.count(1, 4000, 5000), 119)
2323-
# the 1000th prime is 7919
2324-
self.assertEqual(count_n(sieve, 1000) - 1, 7919)
2325-
23262310
# ---------------------------------------------------------------------------
23272311

23282312
class SerializationTests(unittest.TestCase, Util):

0 commit comments

Comments
 (0)