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:
Daniel Schadt 2016-03-23 23:56:23 +01:00
parent a77e085952
commit 700756aa16

View File

@ -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)
])