MCPcopy
hub / github.com/beetbox/beets / test_case_sensitivity

Method test_case_sensitivity

test/test_query.py:420–429  ·  view source on GitHub ↗

Test path matching with different case sensitivity settings.

(
        self, lib, monkeypatch, case_sensitive, expected_titles
    )

Source from the content-addressed store, hash-verified

418 ],
419 )
420 def test_case_sensitivity(
421 self, lib, monkeypatch, case_sensitive, expected_titles
422 ):
423 """Test path matching with different case sensitivity settings."""
424 q = f"path:{self.abs_query_path('/a/b/c2.mp3')}"
425 monkeypatch.setattr(
426 "beets.util.case_sensitive", lambda *_: case_sensitive
427 )
428
429 assert {i.title for i in lib.items(q)} == set(expected_titles)
430
431 # FIXME: Also create a variant of this test for windows, which tests
432 # both os.sep and os.altsep

Callers

nothing calls this directly

Calls 2

abs_query_pathMethod · 0.95
itemsMethod · 0.45

Tested by

no test coverage detected