We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents cc906f6 + 1674b97 commit 38acedcCopy full SHA for 38acedc
tests/test_dataframe_mapper.py
@@ -1,5 +1,11 @@
1
import pytest
2
-from mock import Mock
+
3
+# In py3, mock is included with the unittest standard library
4
+# In py2, it's a separate package
5
+try:
6
+ from unittest.mock import Mock
7
+except ImportError:
8
+ from mock import Mock
9
10
from pandas import DataFrame
11
import pandas as pd
tox.ini
@@ -8,6 +8,7 @@ deps =
setuptools==16.0
wheel==0.24.0
flake8==2.4.1
+ py27: mock==1.3.0
12
13
commands =
14
pip install numpy --no-index
@@ -16,4 +17,4 @@ commands =
16
17
pip install scikit-learn --no-index
18
python setup.py develop
19
flake8 tests
- py.test
20
+ py.test
0 commit comments