Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 9 additions & 7 deletions tests/test_endpoint_modelchains_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,22 @@ 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
result = get_file_paths_in_folder(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."""
Expand Down
3 changes: 2 additions & 1 deletion tests/test_logging.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging
import os

import pytest

Expand Down Expand Up @@ -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
Expand Down
Loading