Skip to content

Commit

Permalink
lenience
Browse files Browse the repository at this point in the history
  • Loading branch information
stgm committed Oct 7, 2022
1 parent a7fe51f commit 89bcc83
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion tests/klimaatTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,33 @@ def testMethod():
In 2018 varieerde de temperatuur tussen -4.6° op 28-02 en 35.7° op 26-07
In 2019 varieerde de temperatuur tussen -1.1° op 24-01 en 37.5° op 25-07""")

o15 = ("""CLIMATE ANALYSIS
Data file
-----------
Filename: climate.csv
First date: 01-01-1901
Last date: 31-12-2019
Basic information
-----------------
Lowest temperature: -11.4° on 26-01-1942
Highest temperature: 37.5° on 25-07-2019
Average temperature: 13.6°
Extremes 2010-2019
------------------
In 2010 the temperature varied between -6.1° on 02-12 and 34.4° on 09-07
In 2011 the temperature varied between -0.1° on 31-01 and 32.2° on 28-06
In 2012 the temperature varied between -5.1° on 03-02 and 33.0° on 19-08
In 2013 the temperature varied between -2.8° on 17-01 and 34.0° on 02-08
In 2014 the temperature varied between 1.0° on 03-12 and 32.9° on 19-07
In 2015 the temperature varied between -1.3° on 23-01 and 33.1° on 01-07
In 2016 the temperature varied between -0.8° on 29-12 and 32.9° on 20-07
In 2017 the temperature varied between -1.9° on 18-01 and 31.9° on 27-05
In 2018 the temperature varied between -4.6° on 28-02 and 35.7° on 26-07
In 2019 the temperature varied between -1.1° on 24-01 and 37.5° on 25-07""")

o2 = ("""CLIMATE ANALYSIS
Data file
Expand Down Expand Up @@ -64,6 +91,6 @@ def testMethod():
In 2018 the temperature varied between -4.6° on 28-02 and 35.7° on 26-07
In 2019 the temperature varied between -1.1° on 24-01 and 37.5° on 25-07""")
output = lib.outputOf(test.fileName, overwriteAttributes = [("__name__", "__main__")]).strip()
return output == o1.strip() or output == o2.strip()
return output == o1.strip() or output == o2.strip() or output == o15.strip()
test.test = testMethod
test.description = lambda : "prints exactly the right output"

0 comments on commit 89bcc83

Please sign in to comment.