Example #1
0
 def test_get_earliest_time(self):
     # Test that normal use works
     ac = AnalysisCommand("test %1")
     self.assertEquals(ac.get_earliest_time(), 1)
     # Test that no time in command works == 0
     ac = AnalysisCommand("test")
     self.assertEquals(ac.get_earliest_time(), 0)
     # Test that % can be escaped
     ac = AnalysisCommand("test %% %1")
     self.assertEquals(ac.get_earliest_time(), 1)
     # Test that earliest map is found
     ac = AnalysisCommand("test %1 %2 %19 %1")
     self.assertEquals(ac.get_earliest_time(), 19)
     # Test that future maps don't work
     ac = AnalysisCommand("test %-1")
     self.assertEquals(ac.get_earliest_time(), 0)
Example #2
0
 def test_get_earliest_time(self):
     # Test that normal use works
     ac = AnalysisCommand("test %1")
     self.assertEquals(ac.get_earliest_time(), 1)
     # Test that no time in command works == 0
     ac = AnalysisCommand("test")
     self.assertEquals(ac.get_earliest_time(), 0)
     # Test that % can be escaped
     ac = AnalysisCommand("test %% %1")
     self.assertEquals(ac.get_earliest_time(), 1)
     # Test that earliest map is found
     ac = AnalysisCommand("test %1 %2 %19 %1")
     self.assertEquals(ac.get_earliest_time(), 19)
     # Test that future maps don't work
     ac = AnalysisCommand("test %-1")
     self.assertEquals(ac.get_earliest_time(), 0)
Example #3
0
    def test_constructor(self):
        ac = AnalysisCommand("testing %1 %2")
        self.assertEqual(ac.get_earliest_time(), 2)

        ac2 = AnalysisCommand("testing")
        self.assertEqual(ac2.cmd_string, 'testing')
        self.assertEqual(ac.start_time, 0)
        self.assertEqual(ac.output_fn, None)
Example #4
0
    def test_constructor(self):
        ac = AnalysisCommand("testing %1 %2")
        self.assertEqual(ac.get_earliest_time(), 2)

        ac2 = AnalysisCommand("testing")
        self.assertEqual(ac2.cmd_string, 'testing')
        self.assertEqual(ac.start_time, 0)
        self.assertEqual(ac.output_fn, None)