Exemple #1
0
 def test_workflows(self):
     tr = TestRun(self.testConfig)
     self.assertEqual( tr.get_workflows() , [])
     
     tr.add_workflow( "wf1" )
     tr.add_workflow( "wf2" )
     self.assertEqual( tr.get_workflows() , ["wf1" , "wf2"])
Exemple #2
0
 def test_workflows(self):
     tr = TestRun("test-data/local/run/config.txt")
     self.assertEqual( tr.get_workflows() , [])
     
     tr.add_workflow( "wf1" )
     tr.add_workflow( "wf2" )
     self.assertEqual( tr.get_workflows() , ["wf1" , "wf2"])
Exemple #3
0
    def test_args(self):
        tr = TestRun("test-data/local/run/config.txt")
        self.assertEqual( tr.get_args() , [])

        tr.add_arg("-v")
        self.assertEqual( tr.get_args() , ["-v"])
        tr.add_arg("latest")
        self.assertEqual( tr.get_args() , ["-v" , "latest"])
Exemple #4
0
    def test_check(self):
        tr = TestRun(self.testConfig , "Name")
        tr.add_check( path_exists , "some/file" )

        with self.assertRaises(Exception):
            tr.add_check( 25 , "arg")

        with self.assertRaises(Exception):
            tr.add_check( func_does_not_exist , "arg")
Exemple #5
0
    def test_check(self):
        tr = TestRun("test-data/local/run/config.txt" , "Name")
        tr.add_check( path_exists , "some/file" )

        with self.assertRaises(Exception):
            tr.add_check( 25 , "arg")

        with self.assertRaises(Exception):
            tr.add_check( func_does_not_exist , "arg")
Exemple #6
0
 def test_run_no_workflow(self):
     tr = TestRun(self.testConfig)
     with self.assertRaises(Exception):
         tr.run()
Exemple #7
0
 def test_args2(self):
     tr = TestRun(self.testConfig , args = ["arg1","arg2","-v","latest"])
     self.assertEqual( tr.get_args() , ["arg1","arg2"])
     self.assertEqual(tr.ert_version , "latest")
Exemple #8
0
    def test_cmd(self):
        tr = TestRun(self.testConfig)
        self.assertEqual( tr.ert_cmd , TestRun.default_ert_cmd )

        tr.ert_cmd = "/tmp/test"
        self.assertEqual( "/tmp/test" , tr.ert_cmd )
Exemple #9
0
 def test_run_no_workflow(self):
     tr = TestRun("test-data/local/run/config.txt")
     with self.assertRaises(Exception):
         tr.run()
Exemple #10
0
    def test_cmd(self):
        tr = TestRun("test-data/local/run/config.txt")
        self.assertEqual( tr.ert_cmd , TestRun.default_ert_cmd )

        tr.ert_cmd = "/tmp/test"
        self.assertEqual( "/tmp/test" , tr.ert_cmd )