diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 6dbbcd7..5c110a2 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -30,6 +30,8 @@ jobs: - name: Configure GitHub Pages uses: actions/configure-pages@v5 + with: + enablement: true - name: Set up Python with uv uses: astral-sh/setup-uv@v4 diff --git a/tests/test_endpoint_modelchains_utils.py b/tests/test_endpoint_modelchains_utils.py index d1036d3..f12e0dd 100644 --- a/tests/test_endpoint_modelchains_utils.py +++ b/tests/test_endpoint_modelchains_utils.py @@ -40,9 +40,11 @@ def test_wildcard_pattern_matches_files(self, tmp_path): @pytest.mark.parametrize("pattern", ["*.PAN", "*.pan", "*.Pan"]) def test_wildcard_pattern_case_insensitive(self, tmp_path, pattern): """Test that wildcard patterns are case-insensitive.""" - # Create files with different case extensions - (tmp_path / "module.PAN").touch() - (tmp_path / "module.pan").touch() + # Create files with different case extensions (using distinct names + # so they remain separate on case-insensitive filesystems like + # macOS HFS+/APFS and Windows NTFS) + (tmp_path / "module_a.PAN").touch() + (tmp_path / "module_b.pan").touch() (tmp_path / "inverter.OND").touch() # All patterns should match all case variations @@ -50,10 +52,10 @@ def test_wildcard_pattern_case_insensitive(self, tmp_path, pattern): assert len(result) == 2 # Verify the right files are matched - filenames = [pathlib.Path(p).name for p in result] - assert "module.PAN" in filenames - assert "module.pan" in filenames - assert "inverter.OND" not in filenames + filenames = [pathlib.Path(p).name.lower() for p in result] + assert "module_a.pan" in filenames + assert "module_b.pan" in filenames + assert "inverter.ond" not in filenames def test_specific_filename_pattern(self, tmp_path): """Test that non-wildcard patterns match specific filenames.""" diff --git a/tests/test_logging.py b/tests/test_logging.py index 412e4cb..0a3ee97 100644 --- a/tests/test_logging.py +++ b/tests/test_logging.py @@ -1,4 +1,5 @@ import logging +import os import pytest @@ -50,7 +51,7 @@ def test_calling_twice_does_not_stack_handlers(self): assert len(real_handlers) == 1 def test_custom_handler_is_added(self): - custom_handler = logging.FileHandler("/dev/null") + custom_handler = logging.FileHandler(os.devnull) try: logger = configure_logging(handler=custom_handler) assert custom_handler in logger.handlers