Skip to content

Commit

Permalink
Fix some of the duplicate test names (#1668)
Browse files Browse the repository at this point in the history
  • Loading branch information
shatakshiiii authored Feb 8, 2024
1 parent 1c9266c commit f61b65f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions tests/unit/actions/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
from ansible_navigator.ui_framework.curses_defs import CursesLinePart


def test_color_menu_true():
def test_config_color_menu_true():
"""Test color menu for a val set to the default."""
entry = {"default": True}
assert color_menu(0, "", entry) == (2, 0)


def test_color_menu_false():
def test_config_color_menu_false():
"""Test color menu for a val not set to default."""
entry = {"default": False}
assert color_menu(0, "", entry) == (3, 0)


def test_content_heading_true():
def test_config_content_heading_true():
"""Test menu generation for a defaulted value."""
curses.initscr()
curses.start_color()
Expand All @@ -42,7 +42,7 @@ def test_content_heading_true():
assert heading[0][0].column == 0


def test_content_heading_false() -> None:
def test_config_content_heading_false() -> None:
"""Test menu generation for a value not default."""
curses.initscr()
curses.start_color()
Expand All @@ -69,7 +69,7 @@ def test_content_heading_false() -> None:
assert heading[0][0].column == 0


def test_filter_content_keys() -> None:
def test_config_filter_content_keys() -> None:
"""Test filtering keys."""
obj = {"__key": "value", "key": "value"}
ret = {"key": "value"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def __str__(self):


@pytest.mark.parametrize(argnames="data", argvalues=test_data, ids=id_func)
def test(data: Scenario):
def test_pas(data: Scenario):
"""Test the PAS post processor.
:param data: The test data
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/configuration_subsystem/test_settings_effective.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from ansible_navigator.utils.json_schema import validate


def test_defaults(schema_dict: SettingsSchemaType):
def test_settings_defaults(schema_dict: SettingsSchemaType):
"""Check the settings file used as a sample against the schema.
:param schema_dict: The json schema as a dictionary
Expand Down Expand Up @@ -54,7 +54,7 @@ def test_settings_env_var_to_full(
assert settings.internals.settings_source == Constants.ENVIRONMENT_VARIABLE


def test_cli():
def test_settings_cli():
"""Test the round trip generation of effective settings given some cli parameters."""
settings = deepcopy(NavigatorConfiguration)
settings.internals.initializing = True
Expand All @@ -70,7 +70,7 @@ def test_cli():
assert root["logging"]["level"] == "debug"


def test_env(monkeypatch: pytest.MonkeyPatch):
def test_settings_env(monkeypatch: pytest.MonkeyPatch):
"""Test the round trip generation of effective settings given some environment variables.
:param monkeypatch: The pytest monkeypatch fixture
Expand All @@ -94,7 +94,7 @@ def test_env(monkeypatch: pytest.MonkeyPatch):
assert root["logging"]["level"] == "debug"


def test_full(
def test_settings_full(
settings_env_var_to_full: tuple[Path, SettingsFileType],
):
"""Test the round trip generation of effective settings given a full settings file.
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/logger/test_append.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __str__(self):
def args(self, log_file: Path) -> list[str]:
"""Provide an argument list for the CLI.
:param log_file: The path to the lgo file
:param log_file: The path to the log file
:returns: The list of CLI arguments
"""
arg_list = [
Expand All @@ -53,7 +53,7 @@ def args(self, log_file: Path) -> list[str]:


@pytest.mark.parametrize("data", test_data, ids=id_func)
def test(data: Scenario, monkeypatch: pytest.MonkeyPatch, tmp_path: Path):
def test_log_append(data: Scenario, monkeypatch: pytest.MonkeyPatch, tmp_path: Path):
"""Start with the CLI, create log messages and count.
:param data: The test data
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/logger/test_time_zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def args(self, log_file: Path) -> list[str]:


@pytest.mark.parametrize("data", test_data, ids=id_func)
def test(
def test_tz_support(
data: Scenario,
caplog: pytest.LogCaptureFixture,
monkeypatch: pytest.MonkeyPatch,
Expand Down

0 comments on commit f61b65f

Please sign in to comment.