tests: add more cases for dirbrowser.is_root
The trailing slash might have an effect on the function result, so we should have cases with/without the slash.
This commit is contained in:
parent
a77e085952
commit
700756aa16
@ -57,6 +57,8 @@ class TestIsRoot:
|
||||
|
||||
@pytest.mark.windows
|
||||
@pytest.mark.parametrize('directory, is_root', [
|
||||
('C:\\foo\\bar', False),
|
||||
('C:\\foo\\', False),
|
||||
('C:\\foo', False),
|
||||
('C:\\', True)
|
||||
])
|
||||
@ -65,6 +67,8 @@ class TestIsRoot:
|
||||
|
||||
@pytest.mark.posix
|
||||
@pytest.mark.parametrize('directory, is_root', [
|
||||
('/foo/bar', False),
|
||||
('/foo/', False),
|
||||
('/foo', False),
|
||||
('/', True)
|
||||
])
|
||||
|
Loading…
Reference in New Issue
Block a user