Skip to content

Commit

Permalink
Remove testprojects/tests. (#11561)
Browse files Browse the repository at this point in the history
We want to move away from having test input looking like
real sources in the repo, so that we can, e.g., run all "real"
tests with `./pants test ::`, without that picking up test
input files that look like tests themselves.

[ci skip-rust]

[ci skip-build-wheels]
  • Loading branch information
benjyw committed Feb 14, 2021
1 parent b7cfa33 commit 64aa7db
Show file tree
Hide file tree
Showing 13 changed files with 9 additions and 134 deletions.
10 changes: 0 additions & 10 deletions testprojects/tests/python/BUILD

This file was deleted.

26 changes: 0 additions & 26 deletions testprojects/tests/python/pants/BUILD

This file was deleted.

14 changes: 0 additions & 14 deletions testprojects/tests/python/pants/build_parsing/BUILD

This file was deleted.

8 changes: 0 additions & 8 deletions testprojects/tests/python/pants/dummies/BUILD

This file was deleted.

Empty file.
6 changes: 0 additions & 6 deletions testprojects/tests/python/pants/dummies/test_f1.py

This file was deleted.

6 changes: 0 additions & 6 deletions testprojects/tests/python/pants/dummies/test_f2.py

This file was deleted.

17 changes: 0 additions & 17 deletions testprojects/tests/python/pants/timeout/BUILD

This file was deleted.

12 changes: 0 additions & 12 deletions testprojects/tests/python/pants/timeout/test_exceeds_timeout.py

This file was deleted.

17 changes: 0 additions & 17 deletions testprojects/tests/python/pants/timeout/test_ignores_terminate.py

This file was deleted.

12 changes: 0 additions & 12 deletions testprojects/tests/python/pants/timeout/test_terminates_self.py

This file was deleted.

3 changes: 1 addition & 2 deletions tests/python/pants_test/integration/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ python_integration_tests(
sources = ['goal_rule_integration_test.py'],
dependencies = [
'testprojects/src/python:hello_directory',
'testprojects/tests/python/pants:dummies_directory',
],
uses_pants_run=True,
timeout = 330,
Expand All @@ -37,7 +36,7 @@ python_integration_tests(
name = 'list_integration',
sources = ['list_integration_test.py'],
dependencies = [
'testprojects/tests/python/pants:build_parsing_directory',
'testprojects/src/python:hello_directory',
],
uses_pants_run=True,
timeout = 240,
Expand Down
12 changes: 8 additions & 4 deletions tests/python/pants_test/integration/list_integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,15 @@ def test_list_testproject() -> None:
[
"--backend-packages=pants.backend.python",
"list",
"testprojects/tests/python/pants/build_parsing::",
"testprojects/src/python/hello::",
]
)
pants_run.assert_success()
assert (
pants_run.stdout.strip()
== "testprojects/tests/python/pants/build_parsing:test-nested-variable-access-in-function-call"
assert pants_run.stdout.strip() == "\n".join(
[
"testprojects/src/python/hello",
"testprojects/src/python/hello/greet",
"testprojects/src/python/hello/main",
"testprojects/src/python/hello/main:lib",
]
)

0 comments on commit 64aa7db

Please sign in to comment.