예제 #1
0
 def test_assert_input_file_wildcard_no_match(self):
     appContext = app.AppContext('APP')
     appStep = app.AppStep('STEP1', appContext)
     appStep.__enter__()
     with self.assertRaises(ExecutionError) as ctx:
         filePath = 'easydatalab/tests/resources/data/does_not_*_exists.csv'
         appStep.assert_input_file(filePath)
         self.assertTrue('ExecutionError' in ctx.exception)
예제 #2
0
 def test_assert_input_file_wildcard(self):
     appContext = app.AppContext('APP')
     appStep = app.AppStep('STEP1', appContext)
     appStep.__enter__()
     appStep.assert_input_file('easydatalab/tests/resources/data/file*.csv')
예제 #3
0
 def test_skipped(self):
     appContext = app.AppContext('APP')
     appContext.skip_steps(['STEP1'])
     appStep = appContext.new_step('STEP1')
     appStep.__enter__()
     self.assertEqual(appStep.get_status(), 'Skipped')
예제 #4
0
 def test_enter(self):
     appContext = app.AppContext('APP')
     appStep = app.AppStep('STEP1', appContext)
     appStep.__enter__()
     self.assertEqual(appStep.get_status(), 'Started')
예제 #5
0
 def test_constructor(self):
     appContext = app.AppContext('APP')
     appStep = app.AppStep('STEP1', appContext)
     self.assertEqual(appStep.get_status(), 'Not Started')
     self.assertEqual(str(appStep), 'STEP1')
예제 #6
0
 def test_constructor(self):
     appContext = app.AppContext('APP')
     self.assertEqual(appContext.get_status(), -1)
     self.assertEqual(str(appContext), 'APP')