MCPcopy Create free account
hub / github.com/StackStorm/st2 / test_get_platform

Function test_get_platform

pants-plugins/uses_services/platform_rules_test.py:36–49  ·  view source on GitHub ↗
(rule_runner: RuleRunner)

Source from the content-addressed store, hash-verified

34
35
36def test_get_platform(rule_runner: RuleRunner) -> None:
37 rule_runner.set_options(
38 ["--backend-packages=uses_services"],
39 env_inherit={"PATH", "PYENV_ROOT", "HOME"},
40 )
41
42 platform = rule_runner.request(Platform, ())
43
44 assert isinstance(platform, Platform)
45 assert dataclasses.is_dataclass(platform)
46 # there isn't a good way to inject mocks into the script that
47 # the rule_runner runs in a venv. So, there isn't a nice way
48 # to test the values of the Platform fields as people could
49 # run tests on any platform.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected