Skip to content

Commit

Permalink
add neutralizes
Browse files Browse the repository at this point in the history
  • Loading branch information
stgm committed Oct 4, 2023
1 parent 59f2979 commit ce6fe4a
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 6 deletions.
1 change: 1 addition & 0 deletions tests/integreren/afstandTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def before():
matplotlib.use("Agg")
import matplotlib.pyplot as plt
plt.switch_backend("Agg")
lib.neutralizeFunction(matplotlib.use)
lib.neutralizeFunction(plt.pause)
except ImportError:
pass
Expand Down
2 changes: 2 additions & 0 deletions tests/integreren/histogramTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ def before():
matplotlib.use("Agg")
import matplotlib.pyplot as plt
plt.switch_backend("Agg")
lib.neutralizeFunction(matplotlib.use)
lib.neutralizeFunction(plt.pause)
lib.neutralizeFunction(plt.plot)
except ImportError:
pass

Expand Down
3 changes: 2 additions & 1 deletion tests/integreren/montecarloTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ def before():
matplotlib.use("Agg")
import matplotlib.pyplot as plt
plt.switch_backend("Agg")
lib.neutralizeFunction(plt.pause)
lib.neutralizeFunction(matplotlib.use)
lib.neutralizeFunction(plt.pause)
lib.neutralizeFunction(plt.plot)
except ImportError:
pass

Expand Down
2 changes: 2 additions & 0 deletions tests/integreren/nulpuntenTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ def before():
matplotlib.use("Agg")
import matplotlib.pyplot as plt
plt.switch_backend("Agg")
lib.neutralizeFunction(matplotlib.use)
lib.neutralizeFunction(plt.pause)
lib.neutralizeFunction(plt.plot)
except ImportError:
pass

Expand Down
1 change: 1 addition & 0 deletions tests/integreren/plotTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def before():
matplotlib.use("Agg")
import matplotlib.pyplot as plt
plt.switch_backend("Agg")
lib.neutralizeFunction(matplotlib.use)
lib.neutralizeFunction(plt.pause)
except ImportError:
pass
Expand Down
4 changes: 0 additions & 4 deletions tests/integreren/randomwiskundeTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,3 @@ def correctAmount(test):
test.test = lambda : assertlib.numberOnLine(math.e, lib.getLine(lib.outputOf(_fileName), 0), deviation = 0.0027)
test.description = lambda : "Geeft de correcte gemiddeld aantal worpen"
test.succes = lambda info : "komt dit getal bekend voor?"




2 changes: 2 additions & 0 deletions tests/integreren/riemannTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ def before():
matplotlib.use("Agg")
import matplotlib.pyplot as plt
plt.switch_backend("Agg")
lib.neutralizeFunction(matplotlib.use)
lib.neutralizeFunction(plt.pause)
lib.neutralizeFunction(plt.plot)
except ImportError:
pass

Expand Down
11 changes: 10 additions & 1 deletion tests/integreren/twitterTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ def before():
matplotlib.use("Agg")
import matplotlib.pyplot as plt
plt.switch_backend("Agg")
lib.neutralizeFunction(matplotlib.use)
lib.neutralizeFunction(plt.pause)
lib.neutralizeFunction(plt.plot)
except ImportError:
pass

Expand Down Expand Up @@ -60,6 +62,13 @@ def correctFunc1(test):

# ^---- Filter global code from source file -----

test.test = lambda : assertlib.between(lib.getFunction("twitter", _fileName)(), 0.82, 0.83)
def testMethod():
import time
s = time.time()
res = assertlib.between(lib.getFunction("twitter", _fileName)(), 0.82, 0.83)
print(time.time() - s)
return res

test.test = testMethod
test.description = lambda : "twitter geeft het juiste antwoord"
test.timeout = lambda : 90

0 comments on commit ce6fe4a

Please sign in to comment.