Fix test_variable_documentation failing test#981
Merged
Conversation
Br3nda
reviewed
Mar 16, 2021
|
|
||
| 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" |
Contributor
There was a problem hiding this comment.
could it be easier to read as:
Suggested change
| 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 | |
| """ |
Contributor
There was a problem hiding this comment.
^^^ Suggestion only, I'll hit approve button
Br3nda
approved these changes
Mar 16, 2021
Member
|
It would be great if this landed soon, all tests fail until this one is merged 🙂 For example, #982 is blocked because of that. |
Member
|
@maukoquiroga unless you'd prefer to finalise this, I intend to merge it today to unblock #982 🙂 |
Member
|
This test could be made much more reliable by asserting the presence of a subset of the text rather than asserting full string equality. |
Member
Author
|
Hi @MattiSG, thanks for the proposed PR, accepted it, way better ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Technical changes