Skip to content

Commit 479804c

Browse files
committed
Fix pathlib/pathlib2 import in test_kaleido.py
1 parent 68f1af1 commit 479804c

File tree

1 file changed

+6
-1
lines changed
  • packages/python/plotly/plotly/tests/test_optional/test_kaleido

1 file changed

+6
-1
lines changed

packages/python/plotly/plotly/tests/test_optional/test_kaleido/test_kaleido.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
import plotly.io as pio
22
import plotly.io.kaleido
33
import sys
4-
from pathlib import Path
54
from contextlib import contextmanager
65

6+
try:
7+
from pathlib import Path
8+
except ImportError:
9+
# For Python < 3.4 use pathlib2
10+
from pathlib2 import Path
11+
712
if sys.version_info >= (3, 3):
813
from unittest.mock import Mock
914
else:

0 commit comments

Comments
 (0)