-
Notifications
You must be signed in to change notification settings - Fork 88
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
Make test result doubles accept event log #157
Conversation
Reviewed 3 of 3 files at r1. testtools/testresult/real.py, line 387 [r1] (raw file): Comments from the review on Reviewable.io |
Review status: 2 of 3 files reviewed at latest revision, 1 unresolved discussion. testtools/testresult/real.py, line 387 [r1] (raw file): FWIW, Comments from the review on Reviewable.io |
LGTM - ship it ;) |
Review status: 2 of 3 files reviewed at latest revision, 8 unresolved discussions. testtools/testresult/real.py, line 358 [r2] (raw file): testtools/testresult/real.py, line 387 [r2] (raw file): And please don't call it SOMETHING_map if it doesn't abide by maps' signature (which it doesn't). testtools/testresult/real.py, line 389 [r2] (raw file): The change from _args + *_kwargs to function, items is making your new thing incompatible with actual map (which can take many sequences), so the name change does needs to happen if you're making that change, so please keep an unaltered version around - perhaps with a deprecation warning or something. testtools/testresult/real.py, line 431 [r2] (raw file): testtools/testresult/real.py, line 702 [r2] (raw file): testtools/tests/test_testresult.py, line 227 [r2] (raw file): testtools/tests/test_testresult.py, line 533 [r2] (raw file): Comments from the review on Reviewable.io |
Ah, I just noticed - flake8. So my experience with flake8 is that you have to turn a bunch of its checks off to have clean code. Otherwise you get consistently bad code. pep8 was *never intended for use outside the standard library, and while I do subscribe to the gofmt philosophy, flake8 ain't that: because a) it doesn't pretty print for you, so when the rules are in the way you can't issue new rules and have it Just Work, and b) the rules haven't been hammered out in the expectation that everyone will blindly apply them. |
* Private name for `_strict_map` * Use `map` signature to `_strict_map` * Add alias `domap` with deprecation warning
Hi Rob, I know that PEP 8 was not written with the intent of being used outside the standard library. I've read the darn thing several times over. Nevertheless,
My experience with flake8 is almost directly contrary to yours. jml Review status: 1 of 3 files reviewed at latest revision, 8 unresolved discussions. testtools/testresult/real.py, line 358 [r2] (raw file): testtools/testresult/real.py, line 387 [r2] (raw file): testtools/testresult/real.py, line 389 [r2] (raw file): testtools/testresult/real.py, line 431 [r2] (raw file): testtools/testresult/real.py, line 702 [r2] (raw file): testtools/tests/test_testresult.py, line 227 [r2] (raw file): testtools/tests/test_testresult.py, line 533 [r2] (raw file): Comments from the review on Reviewable.io |
Make test result doubles accept event log
I was looking around at the test result code in preparation for using it with flocker. While I was there, I noticed a heap of lint in flake8, so I've fixed it.
There's a small semantic change also. Add an
event_log
parameter to all of the test result doubles, and use that if it's provided. This spares code that uses them from having to know about_log
.