Skip to content
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

Check untyped defs in all integration tests except #5129

Merged
merged 3 commits into from Oct 23, 2019
Merged

Check untyped defs in all integration tests except #5129

merged 3 commits into from Oct 23, 2019

Conversation

karlb
Copy link
Contributor

@karlb karlb commented Oct 21, 2019

the ones in integration.network.

PR review check list

Quality check list that cannot be automatically verified.

  • Safety
  • Code quality
    • Error conditions are handled
    • Exceptions are propagated to the correct parent greenlet
    • Exceptions are correctly classified as recoverable or unrecoverable
  • Compatibility
    • State changes are forward compatible
    • Transport messages are backwards and forward compatible
  • Commits
    • Have good messages
    • Squashed unecessary commits
  • If it's a bug fix:
    • Regression test for the bug
      • Properly covers the bug
      • If an integration test is used, it could not be written as a unit test
  • Documentation
    • A new CLI flag was introduced, is there documentation that explains usage?
  • Specs
    • If this is a protocol change, are the specs updated accordingly? If so, please link PR from the specs repo.
  • Is it a user facing feature/bug fix?
    • Changelog entry has been added

the ones in `integration.network`.
@karlb karlb marked this pull request as ready for review October 21, 2019 13:28
@auto-assign auto-assign bot requested a review from LefterisJP October 21, 2019 13:28
Copy link
Contributor

@palango palango left a comment

Choose a reason for hiding this comment

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

Nice, we're getting close.

Fine to merge when the tests pass.

raiden/tests/integration/test_pythonapi.py Show resolved Hide resolved
Copy link
Contributor

@LefterisJP LefterisJP left a comment

Choose a reason for hiding this comment

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

Looks good. Just asked for some changes. But tests fail for probably unrelated error

code = app0.raiden.rpc_client.web3.eth.getCode(
to_checksum_address(token_network_address), block_number
)
code = app0.raiden.rpc_client.web3.eth.getCode(token_network_address, block_number)
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick use kwargs

app0.raiden.rpc_client,
contract_manager=contract_manager,
constructor_arguments=(token_amount, 2, "raiden", "Rd"),
new_token_address = TokenAddress(
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not create a helper function for this deployment which also returns the proper type?

timeout=network_wait * number_of_nodes,
)
# stop app1 - the test uses token_network_contract now
app1.stop()
token_network_contract = app1.raiden.proxy_manager.token_network(token_network_address)
empty_balance_proof = BalanceProof(
channel_identifier=channel_identifier,
token_network_address=to_checksum_address(token_network_contract.address),
token_network_address=TokenNetworkAddress(token_network_contract.address),
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice find. I had to go check the code to make sure that you did not make a mistake here. How come the test was passing before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably because they still got converted into the desired format everywhere where it is actually used (pack_data, etc.). I didn't check in detail.

deploy_client=app1.raiden.rpc_client,
contract_manager=contract_manager,
constructor_arguments=(token_amount, 2, "raiden", "Rd"),
token_address = TokenAddress(
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above for the helper function here and in other parts in this file

We need one in multiple tests, so this is a nice way to make the tests
more concise.
@codecov
Copy link

codecov bot commented Oct 23, 2019

Codecov Report

❗ No coverage uploaded for pull request base (develop@b3f5905). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             develop    #5129   +/-   ##
==========================================
  Coverage           ?   80.63%           
==========================================
  Files              ?      120           
  Lines              ?    14776           
  Branches           ?     2296           
==========================================
  Hits               ?    11914           
  Misses             ?     2178           
  Partials           ?      684

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b3f5905...50ab14b. Read the comment docs.

@palango palango merged commit 9b356b0 into raiden-network:develop Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants