Skip to content

Commit 7c2583a

Browse files
Set specific pytest version for Python 2
1 parent fb17e7f commit 7c2583a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ def run_tests(self):
2525

2626
version = "0.1.8"
2727

28+
TEST_REQUIRE = ['pytest']
29+
if sys.version_info[0] == 2:
30+
TEST_REQUIRE = ['pytest==4.6.3']
31+
2832
setup(name="python-lambda-local",
2933
version=version,
3034
description="Run lambda function in python on local machine.",
@@ -46,7 +50,7 @@ def run_tests(self):
4650
include_package_data=True,
4751
zip_safe=False,
4852
python_requires='>=2.7,!=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4',
49-
tests_require=['pytest'],
53+
tests_require=TEST_REQUIRE,
5054
cmdclass={'test': PyTest},
5155
install_requires=['boto3'],
5256
entry_points={

0 commit comments

Comments
 (0)