We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
There's probably a clever way to support this, but I'm not sure it's worth the time. Here's something that fails:
def get_alliance_stations() -> list[str]: stations = (1, 2, 3) if "CI" in os.environ: # pragma: no branch return [ f"{alliance}{station}" for alliance in ("Blue", "Red") for station in stations ] else: # pragma: no cover return [f"Blue{random.choice(stations)}", f"Red{random.choice(stations)}"] @pytest.mark.parametrize("station", get_alliance_stations()) def test_fuzz(control: TestController, station: str) -> None: ...
The text was updated successfully, but these errors were encountered:
An ugly workaround that a user can do for this situation is the following:
def get_alliance_stations() -> list[str]: import json cached = os.environ.get("ALLIANCE_CACHE", None) if cached: return json.loads(cached) stations = (1, 2, 3) if "CI" in os.environ: # pragma: no branch choices = [ f"{alliance}{station}" for alliance in ("Blue", "Red") for station in stations ] else: # pragma: no cover choices = [f"Blue{random.choice(stations)}", f"Red{random.choice(stations)}"] os.environ["ALLIANCE_CACHE"] = json.dumps(choices) return choices
Sorry, something went wrong.
pytest-xdist doesn't support this either, so if they don't have a solution I also don't think it's worth us spending the time.
No branches or pull requests
There's probably a clever way to support this, but I'm not sure it's worth the time. Here's something that fails:
The text was updated successfully, but these errors were encountered: