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

Clean up test output #553

Merged
merged 4 commits into from
Nov 13, 2019
Merged

Clean up test output #553

merged 4 commits into from
Nov 13, 2019

Conversation

mdickinson
Copy link
Member

Silence warnings and remove a print in a test.

@codecov-io
Copy link

codecov-io commented Nov 12, 2019

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #553   +/-   ##
=========================================
  Coverage          ?   65.39%           
=========================================
  Files             ?       45           
  Lines             ?     7059           
  Branches          ?     1413           
=========================================
  Hits              ?     4616           
  Misses            ?     2021           
  Partials          ?      422

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 a98541e...94efddf. Read the comment docs.

@@ -258,7 +256,7 @@ def test_provisional_toolkit(self):

with mock_sys_argv(test_args):
with mock_os_environ(test_environ):
print(repr(self.ETSConfig.toolkit))
repr(self.ETSConfig.toolkit)
Copy link
Contributor

Choose a reason for hiding this comment

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

why remove the print but keep the call to repr?

Copy link
Member Author

Choose a reason for hiding this comment

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

To keep the effect of the test. It's (indirectly) testing that the repr doesn't fail, so I wanted to keep that test.

@@ -392,7 +393,7 @@ class Foo(HasTraits):
class Bar(HasTraits):
foo = Instance(IFoo)

b = Bar(foo=Foo())
Bar(foo=Foo())
Copy link
Contributor

Choose a reason for hiding this comment

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

im guessing this too is a test where we simply instantiate the object and expect to see/not see errors.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, this was a drive-by fix to eliminate a flake8 warning about an unused variable, without changing the semantics of the test.

self.fail(
msg="base.pp should have thrown AttributeError "
"as Category subclassing is not supported."
)
except AttributeError:
pass

basepp = BasePlusPlus()
BasePlusPlus()
Copy link
Contributor

Choose a reason for hiding this comment

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

im guessing that this too is a test where we instantiate the object and we expect to see/not-see errors.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep.

Copy link
Contributor

@rahulporuri rahulporuri left a comment

Choose a reason for hiding this comment

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

LGTM except for a questions/clarifications.

@mdickinson mdickinson merged commit 4295e42 into master Nov 13, 2019
@mdickinson mdickinson deleted the test/silence-warnings branch November 13, 2019 10:41
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