-
Notifications
You must be signed in to change notification settings - Fork 430
Combining appengine tests into coverage #287
Conversation
@@ -56,7 +72,7 @@ basepython = python2.7 | |||
deps = {[testenv]basedeps} | |||
nosegae | |||
commands = | |||
nosetests --with-gae --gae-application=tests/data --logging-level=INFO {posargs} tests/test_appengine.py | |||
nosetests --with-gae --gae-application=tests/data --logging-level=INFO tests/test_appengine.py |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@jonparrott Can we |
I want to hold off on removing |
There doesn't seem to be a way to suppress the immediate report on each run. As mentioned, I can add coverage report at the end. |
Yes,
|
Yay for As for suppressing output, we could do it the old-fashioned way: |
lol... uh. Yes, I suppose we could do that, but I'd really rather not. :P |
Another option is to redirect the report to HTML: http://stackoverflow.com/questions/5065455/how-to-disable-nose-tests-coverage-report Though I'm not sure that will leave around the bits in |
Meh, that also feels really hacky. |
Pushed a new commit. This adds a base cover environment in tox, and modifies |
pypy: with_gmp=no | ||
commands = nosetests --ignore-files=test_appengine\.py {posargs} | ||
|
||
[testenv:cover] | ||
[coverbase] |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
We have a trade-off here between what feels hacky and what the output looks like. I'm valuing the output over the stuff we have to do. Something else we haven't mentioned: Why is When I removed it (and had the
|
I'll look into suppressing the output.
If we add an import check for dev_appserver or google.appengine and raise skiptest we no longer have to explicitly exclude it. However, we do still need to run the test itself separately. |
We don't want to skip the tests. We want to check the coverage. I don't think the conflict needs to occur, but it may take a little work to get them to all run together. |
I'm not sure what you mean? |
We don't want raise |
I'm still not following. Are you wanting to move to one run of |
Yes that was the point of
|
I've been down that path, and it's not a fun one. dev_appsever / nosegae does a lot of horrible, horrible things to python. It's almost impossible to undo what it does enough to be certain that your other tests aren't tainted by GAE. |
OK I trust you. Then let's focus on the output suppression? Also, any idea why
all show up when just |
Probably because those modules are used by the |
I think having to run I feel like the commands are so long, they belong in a bash script anyhow. (How does that impact Windows users? Or even |
Travis will work for GAE_PYTHONPATH, as it's set for the app engine tests.
That is not fun. :P It's not unheard of for your nose commands to be a bit long for coverage. |
FYI I figured out how to limit the output of just the diff --git a/tox.ini b/tox.ini
index 0cfbac7..5e05741 100644
--- a/tox.ini
+++ b/tox.ini
@@ -28,7 +28,7 @@ commands =
--ignore-files=test_appengine\.py
nosetests \
--with-coverage \
- --cover-package=oauth2client \
+ --cover-package=oauth2client.appengine \
--with-gae \
--cover-tests \
--cover-branches \ |
I had forgotten that you set
before. That can keep it from blocking this PR, but I still plan on making it smarter. |
Alright, I pushed that diff you sent over, so the output it now just the appengine module. Do you still want to silence the output? |
Let's just leave it as-is for now and deal with it if it becomes annoying. I still want to hold off until we hear from Tres about |
SGTM. |
Combining appengine tests into coverage
Adds appengine tests to coverage tox env. The output from
tox -e coverage
is misleading:Running
coverage report
shows that the coverage is actually combined between the two runs:Coveralls should pick up the combined coverage.
This removes nosexcover as well.