diff --git a/.gitignore b/.gitignore index 050a6658d2..06bfe7ec27 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.venv .project .spyderproject .pydevproject diff --git a/README.md b/README.md index 7110b0bdd5..d1f5767689 100644 --- a/README.md +++ b/README.md @@ -17,10 +17,9 @@ This package contains the core features of OpenFisca, which are meant to be used OpenFisca runs on Python 3.7. More recent versions should work, but are not tested. - ## Installation -If you're developping your own country package, you don't need to explicitly install OpenFisca-Core. It just needs to appear [in your package dependencies](https://github.com/openfisca/openfisca-france/blob/18.2.1/setup.py#L53). +If you're developing your own country package, you don't need to explicitly install OpenFisca-Core. It just needs to appear [in your package dependencies](https://github.com/openfisca/openfisca-france/blob/18.2.1/setup.py#L53). If you want to contribute to OpenFisca-Core itself, welcome! To install it locally in development mode run the following commands: diff --git a/tests/web_api/test_variables.py b/tests/web_api/test_variables.py index b47a14bf11..53d4a8948f 100644 --- a/tests/web_api/test_variables.py +++ b/tests/web_api/test_variables.py @@ -94,8 +94,9 @@ def test_variable_formula_github_link(): def test_variable_formula_content(): - formula_code = "def formula(person, period, parameters):\n \"\"\"\n Income tax.\n\n The formula to compute the income tax for a given person at a given period\n \"\"\"\n return person(\"salary\", period) * parameters(period).taxes.income_tax_rate\n" - assert variable['formulas']['0001-01-01']['content'] == formula_code + content = variable['formulas']['0001-01-01']['content'] + assert "def formula(person, period, parameters):" in content + assert "return person(\"salary\", period) * parameters(period).taxes.income_tax_rate" in content def test_null_values_are_dropped(): @@ -157,4 +158,6 @@ def test_variable_documentation(): variable = json.loads(response.data.decode('utf-8')) assert variable['documentation'] == "This allowance was introduced on the 1st of Jan 1980.\nIt disappeared in Dec 2016." - assert variable['formulas']['1980-01-01']['documentation'] == "\nHousing allowance.\n\nThis allowance was introduced on the 1st of Jan 1980.\nCalculating it before this date will always return the variable default value, 0.\n\nTo compute this allowance, the 'rent' value must be provided for the same month,\nbut 'housing_occupancy_status' is not necessary.\n" + formula_documentation = variable['formulas']['1980-01-01']['documentation'] + assert "Housing allowance." in formula_documentation + assert "Calculating it before this date will always return the variable default value, 0." in formula_documentation