Test explicit path queries with different path specifications.
(
self, monkeypatch, lib, path, expected_titles, trailing_sep
)
| 360 | ], |
| 361 | ) |
| 362 | def test_explicit( |
| 363 | self, monkeypatch, lib, path, expected_titles, trailing_sep |
| 364 | ): |
| 365 | """Test explicit path queries with different path specifications.""" |
| 366 | monkeypatch.setattr("beets.util.case_sensitive", lambda *_: True) |
| 367 | if path == r"c\.mp3$": |
| 368 | q = f"path::{path}" |
| 369 | elif path == r"/c/\x" and os.path.__name__ != "ntpath": |
| 370 | q = r"path:/c/\\x" |
| 371 | else: |
| 372 | q = f"path:{self.abs_query_path(path, trailing_sep=trailing_sep)}" |
| 373 | |
| 374 | assert {i.title for i in lib.items(q)} == set(expected_titles) |
| 375 | |
| 376 | @pytest.mark.parametrize( |
| 377 | "query", ["path:", "path::"], ids=["path", "regex"] |
nothing calls this directly
no test coverage detected