Skip to content

Commit

Permalink
Remove unittest2
Browse files Browse the repository at this point in the history
This was a backports library that is no longer necessary for any
python versions currently supported by rope.
  • Loading branch information
lieryan committed Nov 21, 2022
1 parent d3fca6a commit eb6c3c7
Show file tree
Hide file tree
Showing 36 changed files with 36 additions and 144 deletions.
5 changes: 1 addition & 4 deletions ropetest/__init__.py
@@ -1,9 +1,6 @@
import sys

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

import ropetest.projecttest
import ropetest.codeanalyzetest
Expand Down
5 changes: 1 addition & 4 deletions ropetest/advanced_oi_test.py
Expand Up @@ -2,10 +2,7 @@

from rope.base.builtins import Str

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

import rope.base.libutils
import rope.base.oi
Expand Down
5 changes: 1 addition & 4 deletions ropetest/builtinstest.py
@@ -1,9 +1,6 @@
from textwrap import dedent

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

from rope.base import builtins, libutils, pyobjects
from ropetest import testutils
Expand Down
5 changes: 1 addition & 4 deletions ropetest/codeanalyzetest.py
@@ -1,9 +1,6 @@
from textwrap import dedent

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

import rope.base.evaluate
from rope.base import libutils
Expand Down
5 changes: 1 addition & 4 deletions ropetest/contrib/__init__.py
@@ -1,9 +1,6 @@
import sys

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

import ropetest.contrib.autoimporttest
import ropetest.contrib.changestacktest
Expand Down
5 changes: 1 addition & 4 deletions ropetest/contrib/autoimporttest.py
@@ -1,7 +1,4 @@
try:
import unittest2 as unittest
except ImportError:
import unittest
import unittest

from rope.contrib.autoimport import sqlite as autoimport
from ropetest import testutils
Expand Down
5 changes: 1 addition & 4 deletions ropetest/contrib/changestacktest.py
@@ -1,7 +1,4 @@
try:
import unittest2 as unittest
except ImportError:
import unittest
import unittest


import rope.base.history
Expand Down
5 changes: 1 addition & 4 deletions ropetest/contrib/codeassisttest.py
@@ -1,10 +1,7 @@
import os.path
from textwrap import dedent

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

from rope.base import exceptions
from rope.contrib.codeassist import (
Expand Down
5 changes: 1 addition & 4 deletions ropetest/contrib/finderrorstest.py
@@ -1,9 +1,6 @@
from textwrap import dedent

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


from rope.contrib import finderrors
Expand Down
5 changes: 1 addition & 4 deletions ropetest/contrib/findittest.py
@@ -1,9 +1,6 @@
from textwrap import dedent

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

from rope.base import exceptions
from rope.contrib.findit import find_occurrences, find_implementations, find_definition
Expand Down
5 changes: 1 addition & 4 deletions ropetest/contrib/fixmodnamestest.py
@@ -1,7 +1,4 @@
try:
import unittest2 as unittest
except ImportError:
import unittest
import unittest


from ropetest import testutils
Expand Down
5 changes: 1 addition & 4 deletions ropetest/contrib/generatetest.py
@@ -1,9 +1,6 @@
from textwrap import dedent

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

from rope.base import exceptions
from rope.contrib import generate
Expand Down
5 changes: 1 addition & 4 deletions ropetest/doatest.py
Expand Up @@ -9,10 +9,7 @@
import pickle
import socket

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


from rope.base.oi import doa
Expand Down
5 changes: 1 addition & 4 deletions ropetest/historytest.py
@@ -1,7 +1,4 @@
try:
import unittest2 as unittest
except ImportError:
import unittest
import unittest

import rope.base.history
from rope.base import exceptions
Expand Down
5 changes: 1 addition & 4 deletions ropetest/objectdbtest.py
@@ -1,7 +1,4 @@
try:
import unittest2 as unittest
except ImportError:
import unittest
import unittest


from rope.base.oi import objectdb, memorydb
Expand Down
5 changes: 1 addition & 4 deletions ropetest/objectinfertest.py
@@ -1,9 +1,6 @@
from textwrap import dedent

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

import rope.base.project
import rope.base.builtins
Expand Down
5 changes: 1 addition & 4 deletions ropetest/projecttest.py
Expand Up @@ -12,10 +12,7 @@
from ropetest import testutils


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


class ProjectTest(unittest.TestCase):
Expand Down
5 changes: 1 addition & 4 deletions ropetest/pycoretest.py
Expand Up @@ -3,10 +3,7 @@

from rope.base.builtins import File, BuiltinClass

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

from rope.base import exceptions
from rope.base import libutils
Expand Down
5 changes: 1 addition & 4 deletions ropetest/pyscopestest.py
@@ -1,7 +1,4 @@
try:
import unittest2 as unittest
except ImportError:
import unittest
import unittest

from textwrap import dedent

Expand Down
5 changes: 1 addition & 4 deletions ropetest/refactor/__init__.py
@@ -1,9 +1,6 @@
from textwrap import dedent

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

import rope.base.taskhandle
import rope.refactor.introduce_parameter
Expand Down
5 changes: 1 addition & 4 deletions ropetest/refactor/change_signature_test.py
@@ -1,9 +1,6 @@
from textwrap import dedent

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

import rope.base.exceptions
from rope.refactor import change_signature
Expand Down
5 changes: 1 addition & 4 deletions ropetest/refactor/extracttest.py
@@ -1,9 +1,6 @@
from textwrap import dedent

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

import rope.base.codeanalyze
import rope.base.exceptions
Expand Down
5 changes: 1 addition & 4 deletions ropetest/refactor/importutilstest.py
@@ -1,7 +1,4 @@
try:
import unittest2 as unittest
except ImportError:
import unittest
import unittest

from textwrap import dedent

Expand Down
5 changes: 1 addition & 4 deletions ropetest/refactor/inlinetest.py
@@ -1,9 +1,6 @@
from textwrap import dedent

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

import rope.base.exceptions
from rope.refactor import inline
Expand Down
5 changes: 1 addition & 4 deletions ropetest/refactor/movetest.py
@@ -1,9 +1,6 @@
from textwrap import dedent

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

from rope.base import exceptions
from rope.refactor import move
Expand Down
5 changes: 1 addition & 4 deletions ropetest/refactor/multiprojecttest.py
@@ -1,9 +1,6 @@
from textwrap import dedent

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

from rope.refactor import multiproject, rename, move
from ropetest import testutils
Expand Down
5 changes: 1 addition & 4 deletions ropetest/refactor/patchedasttest.py
@@ -1,7 +1,4 @@
try:
import unittest2 as unittest
except ImportError:
import unittest
import unittest
import sys
from textwrap import dedent

Expand Down
5 changes: 1 addition & 4 deletions ropetest/refactor/renametest.py
@@ -1,10 +1,7 @@
import sys
from textwrap import dedent

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

import rope.base.codeanalyze
import rope.refactor.occurrences
Expand Down
5 changes: 1 addition & 4 deletions ropetest/refactor/restructuretest.py
Expand Up @@ -3,10 +3,7 @@
from rope.refactor import restructure
from ropetest import testutils

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


class RestructureTest(unittest.TestCase):
Expand Down
5 changes: 1 addition & 4 deletions ropetest/refactor/similarfindertest.py
@@ -1,9 +1,6 @@
from textwrap import dedent

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

from rope.refactor import similarfinder
from ropetest import testutils
Expand Down
5 changes: 1 addition & 4 deletions ropetest/refactor/suitestest.py
@@ -1,9 +1,6 @@
from textwrap import dedent

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

from rope.base import ast
from rope.refactor import suites
Expand Down
5 changes: 1 addition & 4 deletions ropetest/refactor/usefunctiontest.py
@@ -1,9 +1,6 @@
from textwrap import dedent

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

from rope.base import exceptions
from ropetest import testutils
Expand Down
5 changes: 1 addition & 4 deletions ropetest/runmodtest.py
@@ -1,10 +1,7 @@
import os
from textwrap import dedent

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


from rope.base import exceptions
Expand Down
5 changes: 1 addition & 4 deletions ropetest/simplifytest.py
@@ -1,7 +1,4 @@
try:
import unittest2 as unittest
except ImportError:
import unittest
import unittest

from rope.base import simplify

Expand Down
5 changes: 1 addition & 4 deletions ropetest/testutils.py
Expand Up @@ -4,10 +4,7 @@
import logging

logging.basicConfig(format="%(levelname)s:%(funcName)s:%(message)s", level=logging.INFO)
try:
import unittest2 as unittest
except ImportError:
import unittest
import unittest

import rope.base.project
from rope.contrib import generate
Expand Down
5 changes: 1 addition & 4 deletions ropetest/type_hinting_test.py
@@ -1,9 +1,6 @@
from textwrap import dedent

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


from rope.contrib.codeassist import code_assist
Expand Down

0 comments on commit eb6c3c7

Please sign in to comment.