def test_weekday_interval_parse(text, tests): reset_options() testdata.apply_language_configurations("lang_en") interval = DisjunctiveIntervals.parse_weekday(text) for test in tests: datetime = testdata.str_to_date(test["date"]) expected_match = test["expected"] default = TimeMatchDescription.WEEKDAY_MATCHING result = interval.is_satisfied(datetime, default) assert str(testdata.md2bool(result)) == expected_match
def test_list_of_ranges(input_data, expected_data): testdata.apply_language_configurations("lang_en", "lang_de") output = io.datetime.prepare_list_of_ranges(input_data) assert output == expected_data
def test_match_fr(prefer, tests): preferences.reset_options() testdata.apply_language_configurations("lang_fr") _test_match(prefer, tests)