mirror of
https://github.com/beetbox/beets.git
synced 2025-12-30 20:42:37 +01:00
Don't test absolute paths as queries on Windows
This commit is contained in:
parent
bea77370c4
commit
847c3bbfef
1 changed files with 6 additions and 0 deletions
|
|
@ -32,6 +32,7 @@ from beets.dbcore.query import (NoneQuery, ParsingError,
|
|||
InvalidQueryArgumentTypeError)
|
||||
from beets.library import Library, Item
|
||||
from beets import util
|
||||
import platform
|
||||
|
||||
|
||||
class TestHelper(helper.TestHelper):
|
||||
|
|
@ -582,6 +583,11 @@ class PathQueryTest(_common.LibTestCase, TestHelper, AssertsMixin):
|
|||
self.assertFalse(is_path('foo:/bar'))
|
||||
|
||||
def test_detect_absolute_path(self):
|
||||
if platform.system() == 'Windows':
|
||||
# Because the absolute path begins with something like C:, we
|
||||
# can't disambiguate it from an ordinary query.
|
||||
self.skipTest('Windows absolute paths do not work as queries')
|
||||
|
||||
# Don't patch `os.path.exists`; we'll actually create a file when
|
||||
# it exists.
|
||||
self.patcher_exists.stop()
|
||||
|
|
|
|||
Loading…
Reference in a new issue