Skip to content
This repository has been archived by the owner on Dec 10, 2020. It is now read-only.

Commit

Permalink
Move tests corresponding to pants/task code.
Browse files Browse the repository at this point in the history
Most of these were in backend/core's tests, but one was
in the notorious tests/python/pants_test/tasks dir.

Testing Done:
Ran all tests in the affected dirs.

Full CI passes: https://travis-ci.org/pantsbuild/pants/builds/93261946

Reviewed at https://rbcommons.com/s/twitter/r/3182/
  • Loading branch information
benjyw authored and Benjy committed Nov 26, 2015
1 parent 6e0ddf5 commit 57cc515
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 44 deletions.
34 changes: 0 additions & 34 deletions tests/python/pants_test/backend/core/tasks/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ target(
':dependees',
':filter',
':markdown_to_html',
':mutex_task_mixin',
':scm_publish',
':target_filter_task_mixin',
':testrunner_task_mixin',
],
)

Expand Down Expand Up @@ -109,17 +107,6 @@ python_tests(
]
)

python_tests(
name='mutex_task_mixin',
sources=['test_mutex_task_mixin.py'],
dependencies=[
'src/python/pants/build_graph',
'src/python/pants/task',
'src/python/pants/util:contextutil',
'tests/python/pants_test:base_test',
]
)

python_tests(
name='paths',
sources=['test_paths.py'],
Expand Down Expand Up @@ -149,24 +136,3 @@ python_tests(
'tests/python/pants_test/tasks:task_test_base',
]
)

python_tests(
name='task',
sources=['test_task.py'],
dependencies=[
'src/python/pants/build_graph',
'src/python/pants/task',
'tests/python/pants_test/tasks:task_test_base',
]
)

python_tests(
name='testrunner_task_mixin',
sources=['test_testrunner_task_mixin.py'],
dependencies=[
'src/python/pants/task',
'src/python/pants/util:timeout',
'tests/python/pants_test/tasks:task_test_base',
'3rdparty/python:mock',
]
)
52 changes: 52 additions & 0 deletions tests/python/pants_test/task/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

target(
name='tasks',
dependencies=[
':mutex_task_mixin',
':task',
':testrunner_task_mixin',
],
)

python_tests(
name = 'console_task',
sources = ['test_console_task.py'],
dependencies = [
'src/python/pants/task',
'tests/python/pants_test/tasks:task_test_base',
]
)

python_tests(
name='mutex_task_mixin',
sources=['test_mutex_task_mixin.py'],
dependencies=[
'src/python/pants/build_graph',
'src/python/pants/task',
'src/python/pants/util:contextutil',
'tests/python/pants_test:base_test',
]
)

python_tests(
name='task',
sources=['test_task.py'],
dependencies=[
'src/python/pants/build_graph',
'src/python/pants/task',
'tests/python/pants_test/tasks:task_test_base',
]
)

python_tests(
name='testrunner_task_mixin',
sources=['test_testrunner_task_mixin.py'],
dependencies=[
'src/python/pants/task',
'src/python/pants/util:timeout',
'tests/python/pants_test/tasks:task_test_base',
'3rdparty/python:mock',
]
)
Empty file.
10 changes: 0 additions & 10 deletions tests/python/pants_test/tasks/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ target(
dependencies = [
':builddict',
':check_published_deps',
':console_task',
':detect_duplicates',
':execution_graph',
':group_task',
Expand Down Expand Up @@ -161,15 +160,6 @@ python_tests(
]
)

python_tests(
name = 'console_task',
sources = ['test_console_task.py'],
dependencies = [
':task_test_base',
'src/python/pants/task',
]
)

python_tests(
name = 'detect_duplicates',
sources = ['test_detect_duplicates.py'],
Expand Down

0 comments on commit 57cc515

Please sign in to comment.