Skip to content

PYTHON-1289: remove unittest2 #1117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ scales
nose
mock>1.1
ccm>=2.1.2
unittest2
pytz
sure
pure-sasl
Expand Down
5 changes: 1 addition & 4 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest
import logging
import sys
import socket
Expand Down
5 changes: 1 addition & 4 deletions tests/integration/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
from tests import connection_class, EVENT_LOOP_MANAGER
Cluster.connection_class = connection_class

try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest

from packaging.version import Version
import logging
Expand Down
5 changes: 1 addition & 4 deletions tests/integration/advanced/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest

from six.moves.urllib.request import build_opener, Request, HTTPHandler
import re
Expand Down
5 changes: 1 addition & 4 deletions tests/integration/advanced/graph/fluent/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@
VertexLabel)
from tests.integration import requiredse

try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest


import ipaddress
Expand Down
5 changes: 1 addition & 4 deletions tests/integration/advanced/graph/fluent/test_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@
from tests.integration.advanced.graph.fluent import (
BaseExplicitExecutionTest, create_traversal_profiles, check_equality_base)

try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest


@greaterthanorequaldse60
Expand Down
5 changes: 1 addition & 4 deletions tests/integration/advanced/graph/test_graph_datatype.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest

import time
import six
Expand Down
5 changes: 1 addition & 4 deletions tests/integration/advanced/graph/test_graph_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@
import json
import time

try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest

from cassandra import OperationTimedOut, ConsistencyLevel, InvalidRequest
from cassandra.cluster import EXEC_PROFILE_GRAPH_DEFAULT, NoHostAvailable
Expand Down
5 changes: 1 addition & 4 deletions tests/integration/advanced/test_adv_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@
greaterthanorequaldse68, use_single_node,
DSE_VERSION, requiredse, TestCluster)

try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest

import logging
import time
Expand Down
5 changes: 1 addition & 4 deletions tests/integration/advanced/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest
import logging
import os
import subprocess
Expand Down
5 changes: 1 addition & 4 deletions tests/integration/advanced/test_cont_paging.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
import logging
log = logging.getLogger(__name__)

try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest

from itertools import cycle, count
from six.moves import range
Expand Down
5 changes: 1 addition & 4 deletions tests/integration/advanced/test_cqlengine_where_operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest

import os
import time
Expand Down
5 changes: 1 addition & 4 deletions tests/integration/advanced/test_geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
from cassandra.util import OrderedMap, sortedset
from collections import namedtuple

try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest
from uuid import uuid1
from cassandra.util import Point, LineString, Polygon
from cassandra.cqltypes import LineStringType, PointType, PolygonType
Expand Down
5 changes: 1 addition & 4 deletions tests/integration/advanced/test_unixsocketendpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License
try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest

import time
import subprocess
Expand Down
5 changes: 1 addition & 4 deletions tests/integration/cloud/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@
# limitations under the License
from cassandra.cluster import Cluster

try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest

import os
import subprocess
Expand Down
5 changes: 1 addition & 4 deletions tests/integration/cloud/test_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
from cassandra.cqlengine.models import Model
from cassandra.cqlengine import columns

try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest

import six
from ssl import SSLContext, PROTOCOL_TLS
Expand Down
5 changes: 1 addition & 4 deletions tests/integration/cqlengine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@

import os
import warnings
try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest
from cassandra import ConsistencyLevel

from cassandra.cqlengine import connection
Expand Down
5 changes: 1 addition & 4 deletions tests/integration/cqlengine/advanced/test_cont_paging.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@



try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest

from packaging.version import Version

Expand Down
5 changes: 1 addition & 4 deletions tests/integration/cqlengine/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest

import sys

Expand Down
5 changes: 1 addition & 4 deletions tests/integration/cqlengine/columns/test_static_column.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest

from uuid import uuid4

Expand Down
5 changes: 1 addition & 4 deletions tests/integration/cqlengine/columns/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest

import sys
from datetime import datetime, timedelta, date, tzinfo, time
Expand Down
5 changes: 1 addition & 4 deletions tests/integration/cqlengine/columns/test_value_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest

from datetime import datetime, timedelta, time
from decimal import Decimal
Expand Down
5 changes: 1 addition & 4 deletions tests/integration/cqlengine/connections/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest


from cassandra import ConsistencyLevel
Expand Down
5 changes: 1 addition & 4 deletions tests/integration/cqlengine/management/test_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest

import mock
import logging
Expand Down
5 changes: 1 addition & 4 deletions tests/integration/cqlengine/model/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest

from mock import patch

Expand Down
5 changes: 1 addition & 4 deletions tests/integration/cqlengine/model/test_model_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest

from uuid import uuid4, UUID
import random
Expand Down
5 changes: 1 addition & 4 deletions tests/integration/cqlengine/model/test_udts.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest

from datetime import datetime, date, time
from decimal import Decimal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest

from cassandra.cqlengine.operators import *

Expand Down
5 changes: 1 addition & 4 deletions tests/integration/cqlengine/query/test_named.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest

from cassandra import ConsistencyLevel
from cassandra.cqlengine import operators
Expand Down
5 changes: 1 addition & 4 deletions tests/integration/cqlengine/query/test_queryset.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@
# limitations under the License.
from __future__ import absolute_import

try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest

from datetime import datetime
from uuid import uuid4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest

from uuid import uuid4
import six
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import unittest

import six

Expand Down
Loading