From 3700569b9c979ac715ba54d5d5a4e6fc7cd206a7 Mon Sep 17 00:00:00 2001 From: Vera Schild Date: Sun, 19 Aug 2018 16:37:58 +0200 Subject: [PATCH] Monopoly fix --- tests/module3/monopoly_opdracht1Test.py | 17 +++++++++-------- tests/module3/monopoly_realistischTest.py | 18 +++++++++--------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/tests/module3/monopoly_opdracht1Test.py b/tests/module3/monopoly_opdracht1Test.py index 361296f..3854202 100644 --- a/tests/module3/monopoly_opdracht1Test.py +++ b/tests/module3/monopoly_opdracht1Test.py @@ -4,15 +4,15 @@ import importlib -def before(): - import matplotlib.pyplot as plt - plt.switch_backend("Agg") - lib.neutralizeFunction(plt.pause) +#def before(): +# import matplotlib.pyplot as plt +# plt.switch_backend("Agg") +# lib.neutralizeFunction(plt.pause) -def after(): - import matplotlib.pyplot as plt - plt.switch_backend("TkAgg") - reload(plt) +#def after(): +# import matplotlib.pyplot as plt +# plt.switch_backend("TkAgg") +# reload(plt) @t.test(0) def hasworp_met_twee_dobbelstenen(test): @@ -58,6 +58,7 @@ def try_run(): test.fail = lambda info : "Zorg dat de functie simuleer_groot_aantal_potjes_Monopoly als argument het aantal potjes heeft" return False except: + return True try: testInput = lib.getFunction("simuleer_groot_aantal_potjes_Monopoly", _fileName)(10000) test.success = lambda info : "De code werkt zonder startgeld, je kunt nu startgeld invoeren!" diff --git a/tests/module3/monopoly_realistischTest.py b/tests/module3/monopoly_realistischTest.py index a60bdbe..9a16975 100644 --- a/tests/module3/monopoly_realistischTest.py +++ b/tests/module3/monopoly_realistischTest.py @@ -4,15 +4,15 @@ import importlib -def before(): - import matplotlib.pyplot as plt - plt.switch_backend("Agg") - lib.neutralizeFunction(plt.pause) - -def after(): - import matplotlib.pyplot as plt - plt.switch_backend("TkAgg") - reload(plt) +#def before(): +# import matplotlib.pyplot as plt +# plt.switch_backend("Agg") +# lib.neutralizeFunction(plt.pause) + +#def after(): +# import matplotlib.pyplot as plt +# plt.switch_backend("TkAgg") +# reload(plt) @t.test(0) def hassimuleer_groot_aantal_potjes_Monopoly(test):