Skip to content

Commit

Permalink
Week06 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
canbula committed Nov 6, 2023
1 parent 5d823b6 commit ad0c519
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Week06/test_pi.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import numpy as np
import random


files = [f for f in os.listdir(os.path.dirname(__file__)) if f.startswith("pi")]
Expand All @@ -26,6 +27,7 @@ def test_generators():
def test_approaching():
for f in files:
np.random.seed(7)
random.seed(7)
gen = eval(f[:-3]).next_pi()
pi_estimate = next(gen)
for _ in range(1000):
Expand Down

0 comments on commit ad0c519

Please sign in to comment.