Skip to content

Commit e4649b9

Browse files
committed
tests: remove obsolete xfail markers
Signed-off-by: Grant Ramsay <seapagan@gmail.com>
1 parent 93678cc commit e4649b9

File tree

2 files changed

+2
-25
lines changed

2 files changed

+2
-25
lines changed

tests/cli/test_cli_custom_command.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,10 @@ def test_no_command_should_give_help(self, runner: CliRunner) -> None:
102102
assert all(command in result.output for command in command_list)
103103

104104
# ----------------------- test the 'init' function ----------------------- #
105-
@pytest.mark.xfail
106105
def test_init_function(self, mocker, fs) -> None:
107106
"""Test that running 'init' should create a default metadata.
108107
109-
We use 'os.path' to check for the existence of the file, as the
110-
filesystem mock does not work with Path objects created outside of
111-
the test function (though seems to work in Python >=3.10).
108+
We use 'os.path' to check for the existence of the file.
112109
"""
113110
metadata_file_path = str(self.home_dir / self.metadata_file)
114111
fs.create_dir(str(self.home_dir))
@@ -124,13 +121,10 @@ def test_init_function(self, mocker, fs) -> None:
124121
mock_get_config_path.assert_called_once()
125122
assert os.path.exists(metadata_file_path) # noqa: PTH110
126123

127-
@pytest.mark.xfail
128124
def test_init_function_with_existing_metadata(self, fs, mocker) -> None:
129125
"""Test that running 'init' should overwrite existing metadata.
130126
131-
We use 'os.path' to check for the existence of the file, as the
132-
filesystem mock does not work with Path objects created outside of
133-
the test function (though seems to work in Python >=3.10).
127+
We use 'os.path' to check for the existence of the file.
134128
"""
135129
# Setup
136130
fs.create_dir(str(self.home_dir))

tests/cli/test_cli_db_seed.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
# ruff: noqa: S105
44
import csv
5-
import sys
65
from pathlib import Path
76

87
import pytest
@@ -25,10 +24,6 @@ class TestSeedCommand:
2524
seed_users_path = "app.commands.db._seed_users_from_csv"
2625
aiorun_path = "app.commands.db.aiorun"
2726

28-
@pytest.mark.xfail(
29-
sys.version_info < (3, 10),
30-
reason="Fails under Python <3.10, testing issue not a code issue.",
31-
)
3227
def test_seed_no_force_cancels(self, mocker, tmp_path) -> None:
3328
"""Test that running 'seed' without --force cancels the operation."""
3429
# Create a dummy CSV file
@@ -65,10 +60,6 @@ def test_seed_no_force_cancels(self, mocker, tmp_path) -> None:
6560
# Verify seed function was never called
6661
seed_mock.assert_not_called()
6762

68-
@pytest.mark.xfail(
69-
sys.version_info < (3, 10),
70-
reason="Fails under Python <3.10, testing issue not a code issue.",
71-
)
7263
def test_seed_with_force(self, mocker, tmp_path) -> None:
7364
"""Test that running 'seed' with --force seeds the database."""
7465
# Create a dummy CSV file
@@ -103,10 +94,6 @@ def test_seed_with_force(self, mocker, tmp_path) -> None:
10394
# Verify seed function was called with correct arguments
10495
seed_mock.assert_called_once_with(dummy_file)
10596

106-
@pytest.mark.xfail(
107-
sys.version_info < (3, 10),
108-
reason="Fails under Python <3.10, testing issue not a code issue.",
109-
)
11097
def test_seed_with_confirmation(self, mocker, tmp_path) -> None:
11198
"""Test that running 'seed' with confirmation seeds the database."""
11299
# Create a dummy CSV file
@@ -142,10 +129,6 @@ def test_seed_with_confirmation(self, mocker, tmp_path) -> None:
142129
# Verify seed function was called with correct arguments
143130
seed_mock.assert_called_once_with(dummy_file)
144131

145-
@pytest.mark.xfail(
146-
sys.version_info < (3, 10),
147-
reason="Fails under Python <3.10, testing issue not a code issue.",
148-
)
149132
def test_seed_missing_specified_file(self) -> None:
150133
"""Test running 'seed' with a non-existent file fails with an error."""
151134
# Use a path that definitely doesn't exist

0 commit comments

Comments
 (0)