def test_matches_set_output_path(self): filter = BaseFilter(output_path='dir/main.out') assert_false(filter.matches_output('main.out')) assert_false(filter.matches_output('dir/main.in')) assert_false(filter.matches_output('dir/main')) assert_false(filter.matches_output('dir/dir/main.out')) assert_true(filter.matches_output('dir/main.out'))
def test_derives_set_output_path(self): filter = BaseFilter(output_path='dir/main.out') assert_equal(filter.derive_output_path('main.in'), 'dir/main.out') assert_equal(filter.derive_output_path('dir/main.in'), 'dir/main.out')
def test_derives_set_input_path(self): filter = BaseFilter(input_path='dir/main.in') assert_equal(filter.derive_input_paths('dir/main.in'), ['dir/main.in'])