Ejemplo n.º 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)
Ejemplo n.º 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')
Ejemplo n.º 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')
Ejemplo n.º 4
0
 def test_enter(self):
     appContext = app.AppContext('APP')
     appStep = app.AppStep('STEP1', appContext)
     appStep.__enter__()
     self.assertEqual(appStep.get_status(), 'Started')
Ejemplo n.º 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')
Ejemplo n.º 6
0
 def test_constructor(self):
     appContext = app.AppContext('APP')
     self.assertEqual(appContext.get_status(), -1)
     self.assertEqual(str(appContext), 'APP')