Skip to content

Commit

Permalink
Remove check incompatible with parallel execution
Browse files Browse the repository at this point in the history
Signed-off-by: Sylvain Leclerc <[email protected]>
  • Loading branch information
sylvlecl committed Sep 2, 2024
1 parent 43939cf commit 200a8a7
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions tests/variantstudy/test_command_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,6 @@


class TestCommandFactory:
# noinspection SpellCheckingInspection
def setup_class(self):
"""
Set up the test class.
Imports all modules from the `antarest.study.storage.variantstudy.model.command` package
and creates a set of command class names derived from the `ICommand` abstract class.
The objective is to ensure that the unit test covers all commands in this package.
This method is executed once before any tests in the test class are run.
"""
for module_loader, name, ispkg in pkgutil.iter_modules(["antarest/study/storage/variantstudy/model/command"]):
importlib.import_module(
f".{name}",
package="antarest.study.storage.variantstudy.model.command",
)
abstract_commands = {"AbstractBindingConstraintCommand"}
self.command_class_set = {
cmd.__name__ for cmd in ICommand.__subclasses__() if cmd.__name__ not in abstract_commands
}

# noinspection SpellCheckingInspection
@pytest.mark.parametrize(
Expand Down Expand Up @@ -440,12 +420,6 @@ def get_matrix_id(matrix: str) -> str:
assert actual_args == expected_args
assert actual_version == expected_version

self.command_class_set.discard(type(commands[0]).__name__)

def teardown_class(self):
# Check that all command classes have been tested
assert not self.command_class_set


@pytest.mark.unit_test
def test_unknown_command():
Expand Down

0 comments on commit 200a8a7

Please sign in to comment.