Skip to content

Commit 4a8156b

Browse files
authored
Merge pull request #169 from LeoHsiao1/dev
[test] remove FROM_SOURCE_CODE_IMPORT_PYEXIV2
2 parents 07ec916 + fbb6597 commit 4a8156b

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

.github/workflows/test_wheels.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ jobs:
3232
python -m pip install pytest psutil
3333
- name: Test
3434
run: |
35+
# Disable the pyexiv2 in current repository, to use the pyexiv2 installed by pip
36+
python -c "import os; os.rename('pyexiv2/__init__.py', 'pyexiv2/disable__init__.py')"
3537
pytest -sv
36-
env:
37-
FROM_SOURCE_CODE_IMPORT_PYEXIV2: False
3838
3939
on_macos:
4040
strategy:
@@ -58,9 +58,9 @@ jobs:
5858
- name: Test
5959
run: |
6060
brew install inih
61+
# Disable the pyexiv2 in current repository, to use the pyexiv2 installed by pip
62+
python -c "import os; os.rename('pyexiv2/__init__.py', 'pyexiv2/disable__init__.py')"
6163
pytest -sv
62-
env:
63-
FROM_SOURCE_CODE_IMPORT_PYEXIV2: False
6464
6565
on_windows:
6666
strategy:
@@ -82,6 +82,6 @@ jobs:
8282
python -m pip install pytest psutil
8383
- name: Test
8484
run: |
85+
# Disable the pyexiv2 in current repository, to use the pyexiv2 installed by pip
86+
python -c "import os; os.rename('pyexiv2/__init__.py', 'pyexiv2/disable__init__.py')"
8587
pytest -sv
86-
env:
87-
FROM_SOURCE_CODE_IMPORT_PYEXIV2: False

pyexiv2/tests/base.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import pytest
1111

1212
from . import data
13+
from pyexiv2 import *
1314

1415

1516
class ENV:
@@ -22,12 +23,6 @@ class ENV:
2223
test_img_copy = os.path.join(test_dir, 'test-copy.jpg')
2324

2425

25-
if os.environ.get('FROM_SOURCE_CODE_IMPORT_PYEXIV2', 'True'):
26-
from .. import *
27-
else:
28-
from pyexiv2 import *
29-
30-
3126
def setup_function():
3227
if ENV.skip_test:
3328
pytest.skip()

0 commit comments

Comments
 (0)