Skip to content

Commit

Permalink
Move 'current value' pref tests together
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb531 committed Jan 20, 2019
1 parent 7b8116d commit f4c289e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions tests/test_filter_prefs.py
Expand Up @@ -221,6 +221,17 @@ def test_filter_preferences_show_current():
nose.assert_in('NIV', results[1]['subtitle'])


@nose.with_setup(set_up, tear_down)
@use_user_prefs({
'language': 'eng', 'version': 999, 'refformat': '{name}\n\n{content}'})
def test_filter_preferences_show_current_valid_only():
"""should not show invalid current preference values"""
results = yvs.get_result_list('')
nose.assert_equal(len(results), 3)
nose.assert_in('currently', results[0]['subtitle'])
nose.assert_not_in('currently', results[1]['subtitle'])


@nose.with_setup(set_up, tear_down)
def test_filter_preference_entire_query():
"""should match available preference values using entire query string"""
Expand Down Expand Up @@ -261,17 +272,6 @@ def test_filter_preference_ignore_special():
})


@nose.with_setup(set_up, tear_down)
@use_user_prefs({
'language': 'eng', 'version': 999, 'refformat': '{name}\n\n{content}'})
def test_filter_preferences_no_show_invalid_current():
"""should not show invalid current preference values"""
results = yvs.get_result_list('')
nose.assert_equal(len(results), 3)
nose.assert_in('currently', results[0]['subtitle'])
nose.assert_not_in('currently', results[1]['subtitle'])


@nose.with_setup(set_up, tear_down)
@redirect_stdout
def test_main_output(out):
Expand Down

0 comments on commit f4c289e

Please sign in to comment.