Skip to content

Commit

Permalink
Adjust molecule command from cmdline (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianonicolai committed Jan 18, 2024
1 parent ecb5137 commit 2d7f6d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/pytest_ansible/molecule.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def runtest(self):
+ exc.output,
)

cmd.extend((self.name, "-s", scenario))
cmd.extend(("test", "-s", scenario))
# 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")
Expand Down
5 changes: 2 additions & 3 deletions tests/integration/test_molecule.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,11 @@ def test_molecule_runtest() -> None:
)
assert proc.returncode == 0
assert "collected 1 item" in proc.stdout
assert "tests/fixtures/molecule/default/molecule.yml::test " in proc.stdout
assert "tests/fixtures/molecule/default/molecule.yml::test" in proc.stdout
assert "1 passed" in proc.stdout

except subprocess.CalledProcessError as exc:
print(exc.stdout)
print(exc.stderr)
pytest.fail(exc.stderr)


def test_molecule_fixture(molecule_scenario: MoleculeScenario) -> None:
Expand Down

0 comments on commit 2d7f6d5

Please sign in to comment.