def test_score_input_test_name(self):
     self.assertEqual("Syed: 0", score_input("Syed"))
 def test_score_test_non_numeric(self):
     with self.assertRaises(ValueError):
         validate_input_in_functions.score_input("Carl", "ah",
                                                 "Invalid input")
 def test_score_input_test_name(self):
     with self.assertRaises(ValueError):
         validate_input_in_functions.score_input("", "24", "Invalid input")
Example #4
0
 def test_score_input_test_name(self):
     self.assertEqual(v.score_input("MathTest"), 'MathTest: 0')
 def test_score_input_test_score_valid(self):
     self.assertTrue(
         validate_input_in_functions.score_input("Carl", "5",
                                                 "Invalid input"))
Example #6
0
 def test_score_input_test_score_below_range(self):
     self.assertEqual(v.score_input("Unit1", test_score=-10), 'Invalid test score, try again!')
Example #7
0
 def test_test_score_non_numeric(self):
     self.assertEqual(v.score_input("Unit5", 'NonNumeric'), 'Invalid test score, try again!')
 def test_score_input_test_score_below_range(self):
     self.assertEqual("Invalid test score try again",
                      val_input.score_input("Python3!", -1))
 def test_score_input_test_score_above_range(self):
     self.assertEqual("Invalid test score try again",
                      val_input.score_input("Python4!", 101))
Example #10
0
 def test_score_above_range(
     self
 ):  #Verifies that an above range score will return the error messge
     self.assertEqual('Invalid test score, try again!',
                      vif.score_input("Test Name", 150))
Example #11
0
 def test_test_score_non_numeric(
         self
 ):  #Verifies that a non numeric score will return the error messge
     self.assertEqual('Invalid test score, try again!',
                      vif.score_input("Test Name", "NOGOOD"))
Example #12
0
 def test_score_valid(
         self):  #Verifies that a valid test score will have a proper return
     self.assertEqual("Test Name: 100", vif.score_input("Test Name", 100))
Example #13
0
 def test_score_input_test_name(
         self):  #Verifies that the test name is the only required parameter
     self.assertEqual("Test Name: 0", vif.score_input("Test Name"))
 def test_score_input_test_score_valid(self):
     self.assertEqual("Syed: 34", score_input("Syed", 34))
Example #15
0
 def test_score_input_invalid_message(self):
     self.assertEqual(
         score_input(test_name="Shiqi Wang",
                     test_score='-50',
                     invalid_message="Try again"), "Try again")
 def test_test_score_non_numeric(self):
     with self.assertRaises(TypeError):
         val_input.score_input("Python5!", "fifty")
Example #17
0
 def test_score_input_test_score_valid(self):
     self.assertEqual(v.score_input("Unit4", test_score=80), 'Unit4: 80')
 def test_score_input_invalid_message(self):
     self.assertEqual(
         "Not an acceptible score, try again!",
         val_input.score_input("Python6!", 125,
                               "Not an acceptible score, try again!"))
Example #19
0
 def test_score_input_test_score_above_range(self):
     self.assertEqual(v.score_input("PythonTest", test_score=112), 'Invalid test score, try again!')
 def test_score_input_test_score_valid(self):
     self.assertEqual("Python2!: 97", val_input.score_input("Python2!", 97))
Example #21
0
 def test_score_input_invalid_message(self):
     self.assertEqual(v.score_input("ScienceTest", test_score=101), 'Invalid test score, try again!')
Example #22
0
 def test_score_input_test_name(self):
     self.assertEqual(score_input(test_name="Shiqi Wang"),
                      "Test name: Shiqi Wang\nTest score: 0.0")
Example #23
0
 def test_score_input_test_name(self):
     self.assertEqual("Python1!: 0", val_input.score_input("Python1!"))
Example #24
0
 def test_score_input_test_score_valid(self):
     self.assertEqual(score_input(test_name="Shiqi Wang", test_score='50'),
                      "Test name: Shiqi Wang\nTest score: 50.0")
 def test_score_input_test_above_range(self):
     self.assertFalse(
         validate_input_in_functions.score_input("Carl", "101",
                                                 "Invalid input"))
Example #26
0
 def test_score_input_test_score_above_range(self):
     self.assertEqual(score_input(test_name="Shiqi Wang", test_score='200'),
                      "Invalid test score, try again")
 def test_score_input_invalid_message(self):
     with self.assertRaises(ValueError):
         validate_input_in_functions.score_input("", "", "")
Example #28
0
 def test_test_score_non_numeric(self):
     with self.assertRaises(ValueError):
         score_input(test_name="Shiqi Wang", test_score='$%&*&')
 def test_score_input_test_score_valid(self):
     results = validate_input_in_functions.score_input("Zachary", 40)
     expected = "Zachary: 40"
     self.assertTrue(results == expected)
 def test_score_input_invalid_message(self):
     self.assertEqual(
         "Wrong input, please try again!",
         score_input("Syed", 500, "Wrong input, please try again!"))