Executor: Remove duplicate entry with dry-run argument#4660
Executor: Remove duplicate entry with dry-run argument#4660branchv merged 7 commits intopython-poetry:masterfrom
Conversation
|
Moreover, I tested the difference of the new and old code on the Please compare the output of and |
|
One last question: as I said above, I successfully run the commands |
|
I finally rebased my branch and the tests now passed in the CI instance, thank you for updating them! Please feel free to have a look at the suggested changes now. |
neersighted
left a comment
There was a problem hiding this comment.
Hi @mmacchia -- could you please rebase this so it can be merged into master?
Hello @neersighted ! Thank you for picking this up. I managed to rebase after some troubleshooting. Would it be possible to squash the commits when you believe this PR is ready to be merged? |
This reverts commit 5f52980.
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Pull Request Check List
Resolves: #3097
tests/console/commands/plugin/test_remove.pyfile to reflect the bug fix.Apart from running the ci linting steps and pytest locally for both python 3.6 and 3.8, I also tested the code by running
The corresponding output is:
As expected, the command
poetry add --dry-run pycowsayyielded a single output (• Installing pycowsay (0.0.0.1)) and did not add the package to the project (see the output ofpoetry run pip list).The change in the PR solves the duplication issue because the creation of the console output when
not self._enabledis taken care of by the boolean output of theself._should_write_operation(operation)function.Please feel free to get in touch if I can help adding more test cases for the
--dry-runargument or the_enabledflag and to add any feedback. I would be happy to improve/clarify the code in this PR.