def test_standardised_score(self):
     my_population = read_population("population.csv")
     expected_output = read_answer_list("answer_zscore.csv")
     self.assertListEqual(self.calculator.z_score(my_population),
                          expected_output)  # positive test
     self.assertNotEqual(
         self.calculator.z_score(my_population),
         (list(map(lambda x: x + 1, expected_output))))  # negative test
Exemplo n.º 2
0
 def test_z_score(self):
     my_population = read_population("population.csv")
     expected_output = read_answer_list("answer_zscore.csv")
     try:
         self.assertListEqual(self.calculator.z_score(my_population),
                              expected_output)  # positive test
         self.assertNotEqual(
             self.calculator.z_score(my_population),
             (list(map(lambda x: x + 1, expected_output))))  # negative test
     except AssertionError as e:
         print("Z Score has Assertion Error:", e)
         assert 0
 def test_csv_reader(self):
     my_population = read_population("population.csv")
     expected_output = read_answer_list("answer_csv_reader.csv")
     try:
         self.assertListEqual(my_population,
                              expected_output)  # positive test
         self.assertNotEqual(
             my_population,
             (list(map(lambda x: x + 1, expected_output))))  # negative test
     except AssertionError as e:
         print("Csv Reader has Assertion Error:", e)
         assert 0