Skip to content

Commit 646e7cf

Browse files
authored
Merge pull request #279 from nateprewitt/2.6_cleanup
Cleanup lingering code from Python 2.6 and 3.6
2 parents 98ef113 + 2db39af commit 646e7cf

File tree

4 files changed

+5
-26
lines changed

4 files changed

+5
-26
lines changed

extra/test_hypothesis.py

-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# can a) be run separately and b) allow for customization
44
# via env var for longer runs in travis.
55
import os
6-
import sys
76
import numbers
87

98
from hypothesis import given, settings, assume, HealthCheck
@@ -15,11 +14,6 @@
1514
from jmespath.functions import Functions
1615

1716

18-
if sys.version_info[:2] == (2, 6):
19-
raise RuntimeError("Hypothesis tests are not supported on python2.6. "
20-
"Use python2.7, or python3.3 and greater.")
21-
22-
2317
JSON_NUMBERS = (st.integers() | st.floats(allow_nan=False,
2418
allow_infinity=False))
2519

requirements.txt

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
wheel==0.24.0
2-
pytest==6.2.5 ; python_version >= '3.6'
3-
pytest<5.0 ; python_version < '3.6'
4-
pytest-cov==3.0.0 ; python_version >= '3.6'
5-
pytest-cov<3.0.0 ; python_version < '3.6'
2+
pytest==6.2.5
3+
pytest-cov==3.0.0
64
hypothesis==3.1.0 ; python_version < '3.8'
75
hypothesis==5.5.4 ; python_version == '3.8'
86
hypothesis==5.35.4 ; python_version == '3.9'

requirements26.txt

-4
This file was deleted.

tests/__init__.py

+3-12
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
11
import sys
22
from jmespath import ast
33

4-
5-
# The unittest module got a significant overhaul
6-
# in 2.7, so if we're in 2.6 we can use the backported
7-
# version unittest2.
8-
if sys.version_info[:2] == (2, 6):
9-
import unittest2 as unittest
10-
import simplejson as json
11-
from ordereddict import OrderedDict
12-
else:
13-
import unittest
14-
import json
15-
from collections import OrderedDict
4+
import unittest
5+
import json
6+
from collections import OrderedDict
167

178

189
# Helper method used to create an s-expression

0 commit comments

Comments
 (0)