-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix test_variable_documentation failing test #981
Conversation
@@ -94,7 +94,7 @@ def test_variable_formula_github_link(): | |||
|
|||
|
|||
def test_variable_formula_content(): | |||
formula_code = "def formula(person, period, parameters):\n return person('salary', period) * parameters(period).taxes.income_tax_rate\n" | |||
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could it be easier to read as:
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" | |
formula_code = """ | |
def formula(person, period, parameters): | |
\"\"\" | |
Income tax. | |
The formula to compute the income tax for a given person at a given period | |
\"\"\" | |
return person("salary", period) * parameters(period).taxes.income_tax_rate | |
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^^^ Suggestion only, I'll hit approve button
It would be great if this landed soon, all tests fail until this one is merged 🙂 For example, #982 is blocked because of that. |
@maukoquiroga unless you'd prefer to finalise this, I intend to merge it today to unblock #982 🙂 |
This test could be made much more reliable by asserting the presence of a subset of the text rather than asserting full string equality. |
Hi @MattiSG, thanks for the proposed PR, accepted it, way better ! |
Technical changes