Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(819)

Issue 215360043: Standardize skip_files to test_.+; rename support to test_support. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 1 month ago by M-A
Modified:
9 years, 1 month ago
Reviewers:
vadimsh, M-A Ruel
CC:
swarming-eng_googlegroups.com
Base URL:
https://code.google.com/p/swarming@master
Visibility:
Public.

Description

Standardize skip_files to test_.+; rename support to test_support. This is largely a mechanical change. A few imports were reordered along the way. The end goal is to symlink'ing test_support/ from within applications, to reduce sys.path manipulation. R=vadimsh@chromium.org BUG=

Patch Set 1 #

Total comments: 4

Patch Set 2 : Split tool_support/ and test_support/ #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+148 lines, -1306 lines) Patch
M appengine/auth_service/PRESUBMIT.py View 1 1 chunk +3 lines, -6 lines 0 comments Download
M appengine/auth_service/app.yaml View 1 1 chunk +2 lines, -1 line 0 comments Download
M appengine/auth_service/module-backend.yaml View 1 1 chunk +2 lines, -1 line 0 comments Download
M appengine/auth_service/tests/frontend_handlers_test.py View 1 chunk +1 line, -3 lines 0 comments Download
M appengine/auth_service/tests/importer_test.py View 1 chunk +1 line, -2 lines 0 comments Download
M appengine/auth_service/tests/replication_smoke_test.py View 1 2 chunks +3 lines, -11 lines 1 comment Download
M appengine/auth_service/tests/test_env.py View 1 2 chunks +2 lines, -2 lines 0 comments Download
A appengine/auth_service/tool_support View 1 1 chunk +1 line, -0 lines 0 comments Download
M appengine/components/PRESUBMIT.py View 1 1 chunk +2 lines, -3 lines 0 comments Download
D appengine/components/support/__init__.py View 0 chunks +-1 lines, --1 lines 0 comments Download
D appengine/components/support/gae_sdk_utils.py View 1 chunk +0 lines, -575 lines 0 comments Download
D appengine/components/support/local_app.py View 1 chunk +0 lines, -275 lines 0 comments Download
D appengine/components/support/stats_framework_mock.py View 1 chunk +0 lines, -81 lines 0 comments Download
D appengine/components/support/test_case.py View 1 chunk +0 lines, -193 lines 0 comments Download
A appengine/components/test_support/README.md View 1 1 chunk +5 lines, -0 lines 0 comments Download
A + appengine/components/test_support/__init__.py View 0 chunks +-1 lines, --1 lines 0 comments Download
A + appengine/components/test_support/stats_framework_mock.py View 0 chunks +-1 lines, --1 lines 0 comments Download
A + appengine/components/test_support/test_case.py View 0 chunks +-1 lines, --1 lines 0 comments Download
A + appengine/components/test_support/test_env.py View 1 1 chunk +6 lines, -5 lines 0 comments Download
M appengine/components/tests/auth_api_test.py View 1 chunk +2 lines, -3 lines 0 comments Download
M appengine/components/tests/auth_endpoints_api_test.py View 2 chunks +2 lines, -4 lines 0 comments Download
M appengine/components/tests/auth_endpoints_smoke_test.py View 1 2 chunks +3 lines, -4 lines 0 comments Download
M appengine/components/tests/auth_endpoints_test.py View 1 chunk +2 lines, -3 lines 0 comments Download
M appengine/components/tests/auth_handler_test.py View 2 chunks +2 lines, -3 lines 0 comments Download
M appengine/components/tests/auth_host_token_test.py View 1 chunk +2 lines, -2 lines 0 comments Download
M appengine/components/tests/auth_ipaddr_test.py View 1 chunk +2 lines, -2 lines 0 comments Download
M appengine/components/tests/auth_model_test.py View 1 chunk +2 lines, -3 lines 0 comments Download
M appengine/components/tests/auth_replication_test.py View 1 chunk +2 lines, -3 lines 0 comments Download
M appengine/components/tests/auth_signature_test.py View 1 chunk +2 lines, -2 lines 0 comments Download
M appengine/components/tests/auth_tokens_test.py View 1 chunk +3 lines, -4 lines 0 comments Download
M appengine/components/tests/auth_ui_rest_api_test.py View 1 chunk +2 lines, -4 lines 0 comments Download
M appengine/components/tests/config_test.py View 1 chunk +2 lines, -3 lines 0 comments Download
M appengine/components/tests/datastore_utils_mapping_test.py View 1 chunk +2 lines, -2 lines 0 comments Download
M appengine/components/tests/datastore_utils_monotonic_test.py View 1 chunk +2 lines, -2 lines 0 comments Download
M appengine/components/tests/datastore_utils_properties_test.py View 1 chunk +2 lines, -2 lines 0 comments Download
M appengine/components/tests/datastore_utils_serializable_test.py View 1 chunk +2 lines, -2 lines 0 comments Download
M appengine/components/tests/datastore_utils_sharding_test.py View 1 chunk +2 lines, -2 lines 0 comments Download
M appengine/components/tests/datastore_utils_txn_test.py View 1 chunk +2 lines, -2 lines 0 comments Download
M appengine/components/tests/ereporter2_formatter_test.py View 1 chunk +2 lines, -3 lines 0 comments Download
M appengine/components/tests/ereporter2_handlers_test.py View 2 chunks +2 lines, -2 lines 0 comments Download
M appengine/components/tests/ereporter2_logscraper_test.py View 1 chunk +2 lines, -3 lines 0 comments Download
M appengine/components/tests/ereporter2_on_error_test.py View 2 chunks +2 lines, -2 lines 0 comments Download
M appengine/components/tests/ereporter2_ui_test.py View 2 chunks +2 lines, -2 lines 0 comments Download
M appengine/components/tests/stats_framework_test.py View 2 chunks +3 lines, -3 lines 0 comments Download
D appengine/components/tests/test_env.py View 1 chunk +0 lines, -23 lines 0 comments Download
A appengine/components/tests/test_support View 1 chunk +1 line, -0 lines 0 comments Download
M appengine/components/tests/utils_test.py View 1 chunk +2 lines, -2 lines 0 comments Download
A appengine/components/tool_support/README.md View 1 1 chunk +5 lines, -0 lines 0 comments Download
A + appengine/components/tool_support/__init__.py View 1 0 chunks +-1 lines, --1 lines 0 comments Download
A + appengine/components/tool_support/gae_sdk_utils.py View 1 1 chunk +8 lines, -0 lines 0 comments Download
A + appengine/components/tool_support/local_app.py View 1 0 chunks +-1 lines, --1 lines 0 comments Download
M appengine/components/tools/gae.py View 1 1 chunk +1 line, -1 line 0 comments Download
M appengine/isolate/PRESUBMIT.py View 1 1 chunk +3 lines, -6 lines 0 comments Download
M appengine/isolate/app.yaml View 1 1 chunk +2 lines, -1 line 0 comments Download
M appengine/isolate/module-backend.yaml View 1 1 chunk +2 lines, -1 line 0 comments Download
M appengine/isolate/tests/endpoint_handlers_api_test.py View 2 chunks +6 lines, -10 lines 0 comments Download
M appengine/isolate/tests/handlers_api_test.py View 1 chunk +1 line, -1 line 0 comments Download
M appengine/isolate/tests/handlers_test.py View 1 chunk +1 line, -1 line 0 comments Download
M appengine/isolate/tests/model_test.py View 1 chunk +1 line, -1 line 0 comments Download
M appengine/isolate/tests/stats_test.py View 1 chunk +5 lines, -3 lines 0 comments Download
M appengine/isolate/tests/test_env.py View 1 2 chunks +2 lines, -2 lines 0 comments Download
A appengine/isolate/tool_support View 1 1 chunk +1 line, -0 lines 0 comments Download
M appengine/swarming/PRESUBMIT.py View 1 1 chunk +3 lines, -6 lines 0 comments Download
M appengine/swarming/app.yaml View 1 1 chunk +2 lines, -1 line 0 comments Download
M appengine/swarming/local_smoke_test.py View 1 1 chunk +4 lines, -3 lines 0 comments Download
M appengine/swarming/server/bot_code_test.py View 1 chunk +2 lines, -2 lines 0 comments Download
M appengine/swarming/server/bot_management_test.py View 1 chunk +2 lines, -2 lines 0 comments Download
M appengine/swarming/server/stats_test.py View 1 chunk +2 lines, -2 lines 0 comments Download
M appengine/swarming/server/task_pack_test.py View 1 chunk +3 lines, -2 lines 0 comments Download
M appengine/swarming/server/task_request_test.py View 2 chunks +3 lines, -2 lines 0 comments Download
M appengine/swarming/server/task_result_test.py View 2 chunks +2 lines, -2 lines 0 comments Download
M appengine/swarming/server/task_scheduler_test.py View 3 chunks +2 lines, -2 lines 0 comments Download
M appengine/swarming/server/task_to_run_test.py View 1 chunk +2 lines, -2 lines 0 comments Download
M appengine/swarming/swarming_bot/logging_utils_test.py View 1 chunk +0 lines, -1 line 0 comments Download
M appengine/swarming/swarming_bot/main_test.py View 1 chunk +0 lines, -1 line 0 comments Download
M appengine/swarming/swarming_bot/os_utilities_test.py View 1 chunk +0 lines, -1 line 0 comments Download
M appengine/swarming/swarming_bot/task_runner_test.py View 1 chunk +0 lines, -1 line 0 comments Download
M appengine/swarming/swarming_bot/xsrf_client_test.py View 1 chunk +0 lines, -1 line 0 comments Download
M appengine/swarming/test_env.py View 1 2 chunks +2 lines, -2 lines 0 comments Download
M appengine/swarming/test_env_handlers.py View 1 chunk +2 lines, -2 lines 0 comments Download
A appengine/swarming/tool_support View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 3
M-A Ruel
9 years, 1 month ago (2015-03-19 00:41:10 UTC) #1
vadimsh
https://codereview.appspot.com/215360043/diff/1/appengine/auth_service/PRESUBMIT.py File appengine/auth_service/PRESUBMIT.py (right): https://codereview.appspot.com/215360043/diff/1/appengine/auth_service/PRESUBMIT.py#newcode22 appengine/auth_service/PRESUBMIT.py:22: from test_support import gae_sdk_utils gae_sdk_utils is mostly unrelated to ...
9 years, 1 month ago (2015-03-19 06:01:02 UTC) #2
M-A
9 years, 1 month ago (2015-03-19 14:50:10 UTC) #3
Ok, I broke the CL locally and it became too large. I'll redo a smaller one.
Leaving comments for posterity.

https://codereview.appspot.com/215360043/diff/1/appengine/auth_service/PRESUB...
File appengine/auth_service/PRESUBMIT.py (right):

https://codereview.appspot.com/215360043/diff/1/appengine/auth_service/PRESUB...
appengine/auth_service/PRESUBMIT.py:22: from test_support import gae_sdk_utils
On 2015/03/19 06:01:01, vadimsh wrote:
> gae_sdk_utils is mostly unrelated to testing :( It is used from "gae.py" tool.
> That's the reason I called it "support" in a first place (instead of
> "testing_tools" for example), because it's not just for testing. It is a code
> that supports development activities (testing, tooling), but not to be
deployed
> with components. I do not like putting gae_sdk_utils.py into "test_support".

Ok so I split "support" in two:
- tool_support
- test_support

I added README.md to each to explain the difference. wdyt?
I agree that strictly speaking, we do not need to separate both but I think it's
nice to clarify this separation long term even if it is for 2 files.

> "support" and "components" together look nice: you make a symlink to both, and
> use "support" from tests and tools (and blacklist it in app.yaml), and deploy
> "components". I don't see why it is any worse than "test_support" that
> inconsistently includes code not related to testing.

The main downside is that now there will be one more symlink.

https://codereview.appspot.com/215360043/diff/1/appengine/auth_service/tests/...
File appengine/auth_service/tests/frontend_handlers_test.py (left):

https://codereview.appspot.com/215360043/diff/1/appengine/auth_service/tests/...
appengine/auth_service/tests/frontend_handlers_test.py:26: 
On 2015/03/19 06:01:01, vadimsh wrote:
> eh, I like new lines between groups of imports, you don't. We'll keep making
> this bikesheddings over and over.

This is because this confuses the difference between
stdlib/externallib/locallib/. Normally, you'd have:

import sys  # stdlib
...

from components import bar  # externallib
...

from server import foo  # locallib
...

For tests, this muddy up because of the test setup. But when externallib has
multiple subgroups, each become a separated with the same separator (an empty
line) than separating the 3 overall sections.

But yes it is bikeshedding, so I odn't mind too much as long as they are all the
same.

https://codereview.appspot.com/215360043/diff/20001/appengine/auth_service/te...
File appengine/auth_service/tests/replication_smoke_test.py (right):

https://codereview.appspot.com/215360043/diff/20001/appengine/auth_service/te...
appengine/auth_service/tests/replication_smoke_test.py:26: from tool_support
import gae_sdk_utils
This is the part I find interesting, smoke tests do not need test_support.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b