Skip to content

Commit 1f25a40

Browse files
committed
An experiment: without unittest2
1 parent 12a8adc commit 1f25a40

File tree

128 files changed

+107
-5130
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+107
-5130
lines changed

test-requirements.txt

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ scales
33
nose
44
mock>1.1
55
ccm>=2.1.2
6-
unittest2
76
pytz
87
sure
98
pure-sasl

tests/__init__.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
try:
16-
import unittest2 as unittest
17-
except ImportError:
18-
import unittest # noqa
15+
import unittest
1916
import logging
2017
import sys
2118
import socket

tests/integration/__init__.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@
1818
from tests import connection_class, EVENT_LOOP_MANAGER
1919
Cluster.connection_class = connection_class
2020

21-
try:
22-
import unittest2 as unittest
23-
except ImportError:
24-
import unittest # noqa
21+
import unittest
2522

2623
from packaging.version import Version
2724
import logging

tests/integration/advanced/__init__.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
try:
16-
import unittest2 as unittest
17-
except ImportError:
18-
import unittest # noqa
15+
import unittest
1916

2017
from six.moves.urllib.request import build_opener, Request, HTTPHandler
2118
import re

tests/integration/advanced/graph/fluent/__init__.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@
3535
VertexLabel)
3636
from tests.integration import requiredse
3737

38-
try:
39-
import unittest2 as unittest
40-
except ImportError:
41-
import unittest # noqa
38+
import unittest
4239

4340

4441
import ipaddress

tests/integration/advanced/graph/fluent/test_graph.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@
2828
from tests.integration.advanced.graph.fluent import (
2929
BaseExplicitExecutionTest, create_traversal_profiles, check_equality_base)
3030

31-
try:
32-
import unittest2 as unittest
33-
except ImportError:
34-
import unittest # noqa
31+
import unittest
3532

3633

3734
@greaterthanorequaldse60

tests/integration/advanced/graph/test_graph_datatype.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
try:
16-
import unittest2 as unittest
17-
except ImportError:
18-
import unittest # noqa
15+
import unittest
1916

2017
import time
2118
import six

tests/integration/advanced/graph/test_graph_query.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@
2222
import json
2323
import time
2424

25-
try:
26-
import unittest2 as unittest
27-
except ImportError:
28-
import unittest # noqa
25+
import unittest
2926

3027
from cassandra import OperationTimedOut, ConsistencyLevel, InvalidRequest
3128
from cassandra.cluster import EXEC_PROFILE_GRAPH_DEFAULT, NoHostAvailable

tests/integration/advanced/test_adv_metadata.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@
2020
greaterthanorequaldse68, use_single_node,
2121
DSE_VERSION, requiredse, TestCluster)
2222

23-
try:
24-
import unittest2 as unittest
25-
except ImportError:
26-
import unittest # noqa
23+
import unittest
2724

2825
import logging
2926
import time

tests/integration/advanced/test_auth.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
try:
15-
import unittest2 as unittest
16-
except ImportError:
17-
import unittest # noqa
14+
import unittest
1815
import logging
1916
import os
2017
import subprocess

tests/integration/advanced/test_cont_paging.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@
1818
import logging
1919
log = logging.getLogger(__name__)
2020

21-
try:
22-
import unittest2 as unittest
23-
except ImportError:
24-
import unittest # noqa
21+
import unittest
2522

2623
from itertools import cycle, count
2724
from six.moves import range

tests/integration/advanced/test_cqlengine_where_operators.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
try:
16-
import unittest2 as unittest
17-
except ImportError:
18-
import unittest # noqa
15+
import unittest
1916

2017
import os
2118
import time

tests/integration/advanced/test_geometry.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@
1818
from cassandra.util import OrderedMap, sortedset
1919
from collections import namedtuple
2020

21-
try:
22-
import unittest2 as unittest
23-
except ImportError:
24-
import unittest # noqa
21+
import unittest
2522
from uuid import uuid1
2623
from cassandra.util import Point, LineString, Polygon
2724
from cassandra.cqltypes import LineStringType, PointType, PolygonType

tests/integration/advanced/test_unixsocketendpoint.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License
14-
try:
15-
import unittest2 as unittest
16-
except ImportError:
17-
import unittest # noqa
14+
import unittest
1815

1916
import time
2017
import subprocess

tests/integration/cloud/__init__.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@
1313
# limitations under the License
1414
from cassandra.cluster import Cluster
1515

16-
try:
17-
import unittest2 as unittest
18-
except ImportError:
19-
import unittest # noqa
16+
import unittest
2017

2118
import os
2219
import subprocess

tests/integration/cloud/test_cloud.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@
1818
from cassandra.cqlengine.models import Model
1919
from cassandra.cqlengine import columns
2020

21-
try:
22-
import unittest2 as unittest
23-
except ImportError:
24-
import unittest # noqa
21+
import unittest
2522

2623
import six
2724
from ssl import SSLContext, PROTOCOL_TLS

tests/integration/cqlengine/__init__.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414

1515
import os
1616
import warnings
17-
try:
18-
import unittest2 as unittest
19-
except ImportError:
20-
import unittest # noqa
17+
import unittest
2118
from cassandra import ConsistencyLevel
2219

2320
from cassandra.cqlengine import connection

tests/integration/cqlengine/advanced/test_cont_paging.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414

1515

1616

17-
try:
18-
import unittest2 as unittest
19-
except ImportError:
20-
import unittest # noqa
17+
import unittest
2118

2219
from packaging.version import Version
2320

tests/integration/cqlengine/base.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
try:
15-
import unittest2 as unittest
16-
except ImportError:
17-
import unittest # noqa
14+
import unittest
1815

1916
import sys
2017

tests/integration/cqlengine/columns/test_static_column.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
try:
16-
import unittest2 as unittest
17-
except ImportError:
18-
import unittest # noqa
15+
import unittest
1916

2017
from uuid import uuid4
2118

tests/integration/cqlengine/columns/test_validation.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
try:
16-
import unittest2 as unittest
17-
except ImportError:
18-
import unittest # noqa
15+
import unittest
1916

2017
import sys
2118
from datetime import datetime, timedelta, date, tzinfo, time

tests/integration/cqlengine/columns/test_value_io.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
try:
15-
import unittest2 as unittest
16-
except ImportError:
17-
import unittest # noqa
14+
import unittest
1815

1916
from datetime import datetime, timedelta, time
2017
from decimal import Decimal

tests/integration/cqlengine/connections/test_connection.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
try:
16-
import unittest2 as unittest
17-
except ImportError:
18-
import unittest # noqa
15+
import unittest
1916

2017

2118
from cassandra import ConsistencyLevel

tests/integration/cqlengine/management/test_management.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
try:
15-
import unittest2 as unittest
16-
except ImportError:
17-
import unittest # noqa
14+
import unittest
1815

1916
import mock
2017
import logging

tests/integration/cqlengine/model/test_model.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
try:
15-
import unittest2 as unittest
16-
except ImportError:
17-
import unittest # noqa
14+
import unittest
1815

1916
from mock import patch
2017

tests/integration/cqlengine/model/test_model_io.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
try:
15-
import unittest2 as unittest
16-
except ImportError:
17-
import unittest # noqa
14+
import unittest
1815

1916
from uuid import uuid4, UUID
2017
import random

tests/integration/cqlengine/model/test_udts.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
try:
15-
import unittest2 as unittest
16-
except ImportError:
17-
import unittest # noqa
14+
import unittest
1815

1916
from datetime import datetime, date, time
2017
from decimal import Decimal

tests/integration/cqlengine/operators/test_where_operators.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
try:
16-
import unittest2 as unittest
17-
except ImportError:
18-
import unittest # noqa
15+
import unittest
1916

2017
from cassandra.cqlengine.operators import *
2118

tests/integration/cqlengine/query/test_named.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
try:
16-
import unittest2 as unittest
17-
except ImportError:
18-
import unittest # noqa
15+
import unittest
1916

2017
from cassandra import ConsistencyLevel
2118
from cassandra.cqlengine import operators

tests/integration/cqlengine/query/test_queryset.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@
1313
# limitations under the License.
1414
from __future__ import absolute_import
1515

16-
try:
17-
import unittest2 as unittest
18-
except ImportError:
19-
import unittest # noqa
16+
import unittest
2017

2118
from datetime import datetime
2219
from uuid import uuid4

tests/integration/cqlengine/statements/test_assignment_clauses.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
try:
15-
import unittest2 as unittest
16-
except ImportError:
17-
import unittest # noqa
14+
import unittest
1815

1916
from cassandra.cqlengine.statements import AssignmentClause, SetUpdateClause, ListUpdateClause, MapUpdateClause, MapDeleteClause, FieldDeleteClause, CounterUpdateClause
2017

tests/integration/cqlengine/statements/test_base_statement.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
try:
15-
import unittest2 as unittest
16-
except ImportError:
17-
import unittest # noqa
14+
import unittest
1815

1916
from uuid import uuid4
2017
import six

tests/integration/cqlengine/statements/test_insert_statement.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
try:
15-
import unittest2 as unittest
16-
except ImportError:
17-
import unittest # noqa
14+
import unittest
1815

1916
import six
2017

0 commit comments

Comments
 (0)