Skip to content

Conversation

@maflcko
Copy link
Member

@maflcko maflcko commented Jan 13, 2016

This is fixing four python syntax errors in the rpc tests. The rest is just removing imports or semicolons.

@laanwj
Copy link
Member

laanwj commented Jan 14, 2016

This is quite invasive. Wouldn't syntax errors cause the tests to not run at all?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: This additional newline makes this a double-newline. This doesn't seem to match the style of the other files.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure where this came from. Still, PEP suggests two empty lines, so I will just leave it as is.

@GIJensen
Copy link

utACK 7777994, this looks like good cleanup to me.

@maflcko
Copy link
Member Author

maflcko commented Jan 14, 2016

@laanwj Indeed this is touching 129 lines, but all of it should be uncontroversial:

  • Python will silently ignore trailing semicolons and I don't feel strong about this change. Still, I think we should not promote such usage.
  • Excessive imports won't hurt performance too much but they fuzz the code, imo.
  • Finally, python will only complain about syntax errors on runtime. Luckily all of the syntax errors behave like they are not there: You can do raise AssertionFailure("Failed to mine a version=4 blocks") to raise a NameError: name 'AssertionFailure' is not defined which makes travis fail as well but I think raise AssertionError("Failed to mine a version=4 blocks") is much clearer.

@luke-jr
Copy link
Member

luke-jr commented Jan 15, 2016

Concept ACK

@laanwj
Copy link
Member

laanwj commented Jan 16, 2016

@MarcoFalke Thanks for the explanation, makes sense.
utACK

@fanquake
Copy link
Member

Ran this through the extended test suite, no issues.

@laanwj laanwj merged commit 7777994 into bitcoin:master Jan 18, 2016
laanwj added a commit that referenced this pull request Jan 18, 2016
7777994 [qa] Fix pyton syntax in rpc tests (MarcoFalke)
laanwj pushed a commit that referenced this pull request Jan 18, 2016
@maflcko maflcko deleted the Mf1601-rpcSyntax branch January 18, 2016 10:32
str4d added a commit to str4d/zcash that referenced this pull request Feb 8, 2017
zkbot added a commit to zcash/zcash that referenced this pull request Feb 9, 2017
zkbot added a commit to zcash/zcash that referenced this pull request Feb 9, 2017
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants