Skip to content

Refactor and extension#96

Merged
saturnboy merged 11 commits intomasterfrom
refactor-and-extension
Oct 26, 2019
Merged

Refactor and extension#96
saturnboy merged 11 commits intomasterfrom
refactor-and-extension

Conversation

@saturnboy
Copy link
Contributor

huge refactor of the main AssertionBuilder class into separate mixin classes...this should help make things more readable and understandable to others.

@saturnboy saturnboy added this to the v1.0 milestone Oct 21, 2019
@saturnboy saturnboy self-assigned this Oct 21, 2019
@coveralls
Copy link

coveralls commented Oct 21, 2019

Coverage Status

Coverage decreased (-1.7%) to 98.027% when pulling 4afe08c on refactor-and-extension into 78c8f7a on master.

@saturnboy
Copy link
Contributor Author

@amitwer here is PR to completely reorganize the main assertion class into a bunch of sub-classes via the mixin pattern. Feedback?

@saturnboy
Copy link
Contributor Author

@alex-bes here is big refactor PR, including an extension system for welding in your own assertions. See my test in 83e8bb5 for example usage. Feedback?

self._fmt_args_kwargs(*some_args, **some_kwargs)))

### helpers ###
def _err(self, msg):
Copy link
Contributor

Choose a reason for hiding this comment

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

_err is defined here, which uses print, so does assertpy.py need to do from __future__ import print_function opposed to the other files?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

correct, but per #97 probably replace print(out) with logger.warning(out)

@saturnboy saturnboy merged commit 8b27a84 into master Oct 26, 2019
@saturnboy saturnboy deleted the refactor-and-extension branch October 26, 2019 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants