File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
examples/pure-hatch/tests/examplePy Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 1313
1414@pytest .fixture
1515def temperatures ():
16- """Pytest fixture for temperature data, used to avoid duplicate code
17- in all of our tests."""
16+ """Pytest fixture for temperature data, used to avoid duplicate code in all of our tests."""
1817 filename = TEST_DATA / "temperatures_testdata.csv"
1918 df = pandas .read_csv (filename )
2019 return df
2120
2221
2322def test_calc_annual_mean (temperatures ):
24- """Test the calculation of the annual and total mean temperatures in the
25- data"""
26- expected_mean_1988 = temperature .fahrenheit_to_celsius (56.0 )
27- expected_mean_final = temperature .fahrenheit_to_celsius (50.78252 )
23+ """Test the calculation of the annual and total mean temperatures in the data"""
24+ expected_mean_1988 = 13.3333
25+ expected_mean_final = 10.4347
2826
2927 # Calculate the means
3028 df_mean , df_final = temporal .calc_annual_mean (temperatures )
@@ -36,8 +34,7 @@ def test_calc_annual_mean(temperatures):
3634
3735
3836def test_calc_annual_mean_no_data ():
39- """Negative test - test the calculation of the annual and total mean
40- temperatures in the data when given no data results in an empty result"""
37+ """Negative test - test the calculation of the annual and total mean temperatures in the data when given no data results in an empty result"""
4138 temperatures = pandas .DataFrame (columns = ("Year" , "Month" , "Temperature" ))
4239
4340 # Calculate the means with no data
You can’t perform that action at this time.
0 commit comments