Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
benjyw committed Feb 11, 2025
1 parent e0a1ddd commit 1bb6efe
Showing 1 changed file with 26 additions and 21 deletions.
47 changes: 26 additions & 21 deletions src/python/pants/option/options_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ def create_options(
args=["pants", *(args or ())],
env=env or {},
config_sources=[FileContent("pants.toml", toml.dumps(config or {}).encode())],
known_scope_infos=[*(ScopeInfo(scope) for scope in scopes), *(extra_scope_infos or ())],
known_scope_infos=[
*(ScopeInfo(scope, is_goal=scope != GLOBAL_SCOPE) for scope in scopes),
*(extra_scope_infos or ()),
],
)
register_fn(options)
return options
Expand Down Expand Up @@ -478,26 +481,28 @@ def _parse(


_known_scope_infos = [
ScopeInfo(scope)
for scope in (
GLOBAL_SCOPE,
"anotherscope",
"compile",
"compile.java",
"stale",
"test",
"test.junit",
"passconsumer",
"simple",
"simple-dashed",
"scoped.a.bit",
"scoped.and-dashed",
"fromfile",
"fingerprinting",
"enum-opt",
"separate-enum-opt-scope",
"other-enum-scope",
)
ScopeInfo(GLOBAL_SCOPE),
*[
ScopeInfo(scope, is_goal=True)
for scope in (
"anotherscope",
"compile",
"compile.java",
"stale",
"test",
"test.junit",
"passconsumer",
"simple",
"simple-dashed",
"scoped.a.bit",
"scoped.and-dashed",
"fromfile",
"fingerprinting",
"enum-opt",
"separate-enum-opt-scope",
"other-enum-scope",
)
],
]


Expand Down

0 comments on commit 1bb6efe

Please sign in to comment.