Coverage for test/test_step.py: 100%
11 statements
« prev ^ index » next coverage.py v7.3.0, created at 2023-08-25 16:44 +0200
« prev ^ index » next coverage.py v7.3.0, created at 2023-08-25 16:44 +0200
1"""Test the Step class"""
3import pytest
5import manyworlds as mw
8@pytest.fixture(scope="module")
9def given_step():
10 """load a representative root scenario"""
11 forest = mw.ScenarioForest.from_file("test/fixtures/in/scenario_forest.feature")
12 return forest.find("View users").steps[0]
15def test_repr(given_step):
16 assert given_step.__repr__() == "<Prerequisite: The following users:>"
19def test_format(given_step):
20 assert given_step.format() == "Given the following users:"
21 assert given_step.format(first_of_type=False) == " And the following users:"