File tree Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 1616from io import BytesIO
1717from six import binary_type , text_type
1818
19- from mock import MagicMock , Mock , patch
19+ try :
20+ from unittest .mock import MagicMock , Mock , patch
21+ except ImportError :
22+ from mock import MagicMock , Mock , patch
2023
2124from ..multipart import *
2225
Original file line number Diff line number Diff line change 1616version_re = re .compile (r'((?:\d+)\.(?:\d+)\.(?:\d+))' )
1717version = version_re .search (version_data ).group (0 )
1818
19+ tests_require = [
20+ 'pytest' ,
21+ 'pytest-cov' ,
22+ 'PyYAML'
23+ ]
24+
25+ if sys .version_info [0 :2 ] < (3 , 3 ):
26+ tests_require .append ('mock' )
27+
1928setup (name = 'python-multipart' ,
2029 version = version ,
2130 description = 'A streaming multipart parser for Python' ,
2736 install_requires = [
2837 'six>=1.4.0' ,
2938 ],
30- tests_require = [
31- 'pytest' ,
32- 'pytest-cov' ,
33- 'Mock' ,
34- 'PyYAML'
35- ],
39+ tests_require = tests_require ,
3640 packages = [
3741 'multipart' ,
3842 'multipart.tests' ,
You can’t perform that action at this time.
0 commit comments