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

MoleculeScenario doesn't support MOLECULE_OPTS #293

Open
evgeni opened this issue Mar 27, 2024 · 1 comment
Open

MoleculeScenario doesn't support MOLECULE_OPTS #293

evgeni opened this issue Mar 27, 2024 · 1 comment

Comments

@evgeni
Copy link

evgeni commented Mar 27, 2024

When using the simple molecule_scenario fixture, that generates MoleculeScenario entries, there is no way to pass --parallel or similar flags via MOLECULE_OPTS

Looking at the code MoleculeItem does support that:

# We append the additional options to molecule call, allowing user to
# control how molecule is called by pytest-molecule
opts = os.environ.get("MOLECULE_OPTS")
if opts:
cmd.extend(shlex.split(opts))

But that is not used in MoleculeScenario :(

@wmudge
Copy link

wmudge commented Sep 10, 2024

@evgeni - I think you can set the MOLECULE_PARALLEL environment variable when running pytest, as per test subcommand. For example,

MOLECULE_PARALLEL=True pytest -k "your scenario's name"

However, you can't send --destroy=never because there is no support for MOLECULE_OPTS, so the issue is still valid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants