Skip to content

Commit 62324ea

Browse files
fix travis
1 parent 6d3384a commit 62324ea

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

test/test_examples.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from os import getcwd
88
from subprocess import Popen, PIPE
99
from os.path import join, dirname
10-
from dotenv import load_dotenv
1110
from glob import glob
1211

1312
# tests to exclude
@@ -17,10 +16,12 @@
1716
examples_path = join(dirname(__file__), '../', 'examples', '*.py')
1817

1918
# environment variables
20-
dotenv_path = join(dirname(__file__), '../', '.env')
21-
load_dotenv(dotenv_path)
19+
if sys.version_info != (3,2):
20+
from dotenv import load_dotenv
21+
dotenv_path = join(dirname(__file__), '../', '.env')
22+
load_dotenv(dotenv_path)
2223

23-
@pytest.mark.skipif(os.getenv('VCAP_SERVICES') is None or sys.version_info == (3,2), reason='requires VCAP_SERVICES and Python != 3.2')
24+
@pytest.mark.skipif(os.getenv('VCAP_SERVICES') is None, reason='requires VCAP_SERVICES')
2425
def test_examples():
2526
examples = glob(examples_path)
2627
for example in examples:

0 commit comments

Comments
 (0)