Commit 4c05adef by Sébastien Eustace

Fix tests on Windows

parent 69a6bbe9
import sys import sys
try: try:
import pathlib2
from pathlib2 import Path
except ImportError:
from pathlib import Path
try:
from functools32 import lru_cache from functools32 import lru_cache
except ImportError: except ImportError:
from functools import lru_cache from functools import lru_cache
...@@ -26,6 +20,12 @@ PY35 = sys.version_info >= (3, 5) ...@@ -26,6 +20,12 @@ PY35 = sys.version_info >= (3, 5)
PY36 = sys.version_info >= (3, 6) PY36 = sys.version_info >= (3, 6)
if PY35:
from pathlib import Path
else:
from pathlib2 import Path
def decode(string, encodings=None): def decode(string, encodings=None):
if not PY2 and not isinstance(string, bytes): if not PY2 and not isinstance(string, bytes):
return string return string
......
...@@ -91,7 +91,10 @@ def setup(): ...@@ -91,7 +91,10 @@ def setup():
@pytest.fixture() @pytest.fixture()
def package(): def package():
return ProjectPackage("root", "1.0") p = ProjectPackage("root", "1.0")
p.root_dir = Path.cwd()
return p
@pytest.fixture() @pytest.fixture()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment