Skip to content

Commit 1738912

Browse files
authored
Merge pull request #868 from openfisca/fix-test-runner
Fix test runner
2 parents 92ce939 + 3e336cf commit 1738912

File tree

5 files changed

+10
-4
lines changed

5 files changed

+10
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
### 34.0.1
4+
5+
#### Bug fix
6+
7+
- Allow both `*.yaml` and `*.yml` extensions for YAML tests
8+
39
# 34.0.0
410

511
#### Technical changes

openfisca_core/tools/test_runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def __init__(self, tax_benefit_system, options):
224224
self.options = options
225225

226226
def pytest_collect_file(self, parent, path):
227-
if path.ext == ".yaml":
227+
if path.ext in [".yaml", ".yml"]:
228228
return YamlFile(path, parent, self.tax_benefit_system, self.options)
229229

230230

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
setup(
3838
name = 'OpenFisca-Core',
39-
version = '34.0.0',
39+
version = '34.0.1',
4040
author = 'OpenFisca Team',
4141
author_email = '[email protected]',
4242
classifiers = [

tests/core/test_yaml.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def run_yaml_test(path, options = None):
2929

3030

3131
def test_success():
32-
assert run_yaml_test('test_success.yaml') == EXIT_OK
32+
assert run_yaml_test('test_success.yml') == EXIT_OK
3333

3434

3535
def test_fail():
@@ -81,7 +81,7 @@ def test_name_filter():
8181

8282

8383
def test_shell_script():
84-
yaml_path = os.path.join(yaml_tests_dir, 'test_success.yaml')
84+
yaml_path = os.path.join(yaml_tests_dir, 'test_success.yml')
8585
command = ['openfisca', 'test', yaml_path, '-c', 'openfisca_country_template']
8686
with open(os.devnull, 'wb') as devnull:
8787
subprocess.check_call(command, stdout = devnull, stderr = devnull)

0 commit comments

Comments
 (0)