Skip to content

Conversation

@OlufemiAdeOlusile
Copy link
Collaborator

update compatible tests


print("\n >>>>> ERROR START")
print(err)
print(" >>>>> ERROR END\n")
Copy link
Collaborator

Choose a reason for hiding this comment

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

The prints are not needed.


assert "TextEnvelope type error" in err, err
assert "Expected: CertificateConway" in err, err
assert "Actual: UpdateProposalShelley" in err, err
Copy link
Collaborator

Choose a reason for hiding this comment

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

For single error string, assert single substring or regular expression search.

"babbage": ("--max-collateral-inputs", 4, "maxCollateralInputs"),
}


Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be in the class where it is used.


@allure.link(helpers.get_vcs_link())
@submit_utils.PARAM_SUBMIT_METHOD
@pytest.mark.parametrize("era", ["shelley", "mary", "alonzo", "babbage"])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use tuple (immutable data) instead of list here.

out_file = f"{temp_template}_update.proposal"
print("\nERROR MESSAGE START")
print(err_str)
print(" ERROR MESSAGE END\n")
Copy link
Collaborator

Choose a reason for hiding this comment

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

The prints are not needed.

err_str = str(excinfo.value)
assert "Invalid argument `create-update-proposal'" in err_str, err_str
assert "TextEnvelope type error" in err_str
assert "UpdateProposalShelley" in err_str
Copy link
Collaborator

Choose a reason for hiding this comment

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

For single error string, assert single substring or regular expression search.

@pytest.mark.parametrize(
"mir_cert",
("to_treasury", "to_rewards", "treasury_to_addr", "reserves_to_addr"),
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Parametrize each test, not test class.

Expect failure.
def test_mir_certificates(self, cluster, payment_addr, era, mir_cert):
"""
Try each MIR certificate across all compatible eras.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use google style (numpy style) docstrings.

reqc.cip070.success()


reqc.cip070.success()
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should not be here.

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.

3 participants