Skip to content
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

Context always has a scheduler in tests #5997

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions tests/python/pants_test/backend/graph_info/tasks/test_cloc.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,13 @@ def assert_counts(res, lang, files, blank, comment, code):
res = self.execute_console_task(
targets=[py_tgt, java_tgt],
options={'transitive': True},
scheduler=self.scheduler,
)
assert_counts(res, 'Python', files=3, blank=2, comment=3, code=3)
assert_counts(res, 'Java', files=1, blank=0, comment=1, code=1)

res = self.execute_console_task(
targets=[py_tgt, java_tgt],
options={'transitive': False},
scheduler=self.scheduler,
)
assert_counts(res, 'Python', files=2, blank=2, comment=3, code=2)
assert_counts(res, 'Java', files=1, blank=0, comment=1, code=1)
Expand All @@ -68,7 +66,6 @@ def test_ignored(self):
res = self.execute_console_task(
targets=[py_tgt],
options={'ignored': True},
scheduler=self.scheduler,
)
self.assertEquals(['Ignored the following files:',
'src/py/foo/empty.py: zero sized file'],
Expand Down
2 changes: 2 additions & 0 deletions tests/python/pants_test/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,8 @@ def context(self, for_task_types=None, for_subsystems=None, options=None,
Subsystem.reset(reset_options=True)
Subsystem.set_options(fake_options)

scheduler = scheduler or self.scheduler

context = create_context_from_options(fake_options,
target_roots=target_roots,
build_graph=self.build_graph,
Expand Down