Skip to content

Commit 8b141d2

Browse files
committed
error in unittest
With C: the code detects the parent directory to be cwd and in cwd there is a config file which therefore gets detected resulting in the unittest failing
1 parent 06f841d commit 8b141d2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/test_plugin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import collections
2+
import os
23
from unittest.mock import Mock
34

45
import pytest
@@ -35,7 +36,7 @@ def workspace(tmpdir):
3536

3637
class FakeConfig(object):
3738
def __init__(self):
38-
self._root_path = "C:"
39+
self._root_path = "C:" if os.name == "nt" else "/"
3940

4041
def plugin_settings(self, plugin, document_path=None):
4142
return {}

0 commit comments

Comments
 (0)