Example #1
0
 def test_wait_time(self):
     """check_version() is waiting the correct time (3.0s)"""
     start = time.time()
     tournament.check_version((2, 4))
     end = time.time()
     count = round(end - start, 1)
     self.assertEqual(count, 3.0)
Example #2
0
 def test_newer_python3_version(self):
     """check_version() 0 if in spec for same version"""
     self.assertEqual(tournament.check_version((3, 4)), 0)
Example #3
0
 def test_same_python_version(self):
     """check_version() 0 if in spec for same version"""
     self.assertEqual(tournament.check_version((2, 7)), 0)
Example #4
0
 def test_older_python_version(self):
     """check_version() 1 if out of spec"""
     self.assertEqual(tournament.check_version((2, 4)), 1)