Skip to content

Commit

Permalink
Add Python 3.12 to test matrix (#4084)
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianonicolai committed Nov 17, 2023
1 parent feb6a81 commit af72703
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tox.yml
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: coactions/dynamic-matrix@v1
with:
min_python: "3.9"
max_python: "3.11"
max_python: "3.12"
other_names: |
lint
docs
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Expand Up @@ -29,6 +29,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python",
"Topic :: System :: Systems Administration",
"Topic :: Software Development :: Bug Tracking",
Expand Down
9 changes: 0 additions & 9 deletions test/a_unit/command/test_base.py
Expand Up @@ -72,11 +72,6 @@ def _patched_execute_scenario(mocker):
return mocker.patch("molecule.command.base.execute_scenario")


@pytest.fixture()
def _patched_print_matrix(mocker):
return mocker.patch("molecule.scenarios.Scenarios.print_matrix")


@pytest.fixture()
def _patched_prune(mocker):
return mocker.patch("molecule.scenario.Scenario.prune")
Expand Down Expand Up @@ -111,20 +106,16 @@ def test_command_setup(

def test_execute_cmdline_scenarios(
config_instance: config.Config,
_patched_print_matrix,
_patched_execute_scenario,
):
# Ensure execute_cmdline_scenarios runs normally:
# - scenarios.print_matrix is called, which also indicates Scenarios
# was instantiated correctly
# - execute_scenario is called once, indicating the function correctly
# loops over Scenarios.
scenario_name = None
args: dict[str, str] = {}
command_args = {"destroy": "always", "subcommand": "test"}
base.execute_cmdline_scenarios(scenario_name, args, command_args)

assert _patched_print_matrix.called_once_with()
assert _patched_execute_scenario.call_count == 1


Expand Down

0 comments on commit af72703

Please sign in to comment.