Skip to content

Commit

Permalink
update test_preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
ad12 committed Jul 20, 2019
1 parent a9d25ee commit cde6faa
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/test_preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@
'resources/preferences.yml')
_test_preferences_duplicate_filepath = os.path.join(os.path.dirname(os.path.abspath(__file__)),
'resources/.test.preferences.yml')
copyfile(_test_preferences_sample_filepath, _test_preferences_duplicate_filepath)


class PreferencesMock(_Preferences):
_preferences_filepath = _test_preferences_duplicate_filepath


class TestPreferences(unittest.TestCase):
@classmethod
def setUpClass(cls):
copyfile(_test_preferences_sample_filepath, _test_preferences_duplicate_filepath)

@classmethod
def tearDownClass(cls):
if os.path.isfile(_test_preferences_duplicate_filepath):
Expand Down Expand Up @@ -93,6 +96,15 @@ def test_write(self):


class TestPreferencesSchema(unittest.TestCase):
@classmethod
def setUpClass(cls):
copyfile(_test_preferences_sample_filepath, _test_preferences_duplicate_filepath)

@classmethod
def tearDownClass(cls):
if os.path.isfile(_test_preferences_duplicate_filepath):
os.remove(_test_preferences_duplicate_filepath)

def test_cmd_line_schema(self):
"""Test that the command line schema for preferences is valid.
Expand Down

0 comments on commit cde6faa

Please sign in to comment.