Skip to content
This repository was archived by the owner on Aug 10, 2022. It is now read-only.

Commit b9be4c6

Browse files
committed
Use os.path instead of pathlib
1 parent 34fa580 commit b9be4c6

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

tasks.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
from pathlib import Path
1+
from os import path
22

3-
from invoke import task, Collection
3+
from invoke import task
44

5-
here = Path('.').absolute()
5+
here = path.dirname(path.abspath(__file__))
66

77

88
@task
@@ -42,7 +42,6 @@ def install_requirements(c, dev=None, testing=None, lint=None):
4242
'bumpversion',
4343
'wheel',
4444
'twine',
45-
'pathlib',
4645
]
4746
testing_requires = [
4847
'pytest==3.8.2',
@@ -84,7 +83,7 @@ def _packages_resolver(core=None, selenium=None, images=None,
8483

8584
for pack in packages:
8685
if full_path:
87-
pack = here / pack
86+
pack = path.join(here, pack)
8887
if path_as_str:
8988
pack = str(pack)
9089
yield pack

tests/test_integration.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
from pathlib import Path
1+
import os.path
22

3-
here = Path('.').absolute()
3+
here = os.path.dirname(os.path.join(__file__))
4+
root_dir = os.path.normpath(os.path.join(here, os.pardir))
45

56

67
def _packages_resolver(core=None, selenium=None, images=None):
@@ -14,7 +15,7 @@ def _packages_resolver(core=None, selenium=None, images=None):
1415
pack = images_pkg
1516
else:
1617
return None
17-
return str(here / pack)
18+
return str(os.path.join(root_dir, pack))
1819

1920

2021
def test_setup_eyes_core(virtualenv):
@@ -53,11 +54,9 @@ def test_eyes_images_namespace_package(virtualenv):
5354
build_egg=True)
5455
virtualenv.run('python -c "from applitools.images import *"')
5556

56-
5757
# def test_eyes_selenium_namespace_package(virtualenv):
5858
# virtualenv.install_package(_packages_resolver(core=True),
5959
# build_egg=True)
6060
# virtualenv.install_package(_packages_resolver(selenium=True),
6161
# build_egg=True)
6262
# virtualenv.run('python -c "from applitools.selenium import *"')
63-

tox.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ description = run the unit tests with pytest under {basepython}
1818
passenv = SAUCE_USERNAME SAUCE_ACCESS_KEY APPLITOOLS_API_KEY SELENIUM_SERVER_URL TOXENV CI DISPLAY TRAVIS TRAVIS_* APPLITOOLS_BATCH_ID
1919
deps =
2020
invoke
21-
pathlib
2221
pytest==3.8.2
2322

2423
;[testenv:core]

0 commit comments

Comments
 (0)