Skip to content

Commit

Permalink
Updated tests for correct config.
Browse files Browse the repository at this point in the history
Now the tests check that the parameter in question is a file,
rather than not None.
  • Loading branch information
Evildoor committed Jan 23, 2019
1 parent 19ca409 commit c3e4810
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,13 @@ def tearDown(self):

def test_correct_c(self):
self.stage.parse_args(['-c', self.fake_config.name])
self.assertIsNotNone(getattr(self.stage.ARGS, 'config'))
isfile = isinstance(getattr(self.stage.ARGS, 'config'), file)
self.assertTrue(isfile)

def test_correct_config(self):
self.stage.parse_args(['--config', self.fake_config.name])
self.assertIsNotNone(getattr(self.stage.ARGS, 'config'))
isfile = isinstance(getattr(self.stage.ARGS, 'config'), file)
self.assertTrue(isfile)

def test_missing_c(self):
self.fake_config.close()
Expand Down

0 comments on commit c3e4810

Please sign in to comment.