summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xalltests.sh2
-rw-r--r--coverage/execfile.py8
-rw-r--r--coverage/misc.py3
3 files changed, 10 insertions, 3 deletions
diff --git a/alltests.sh b/alltests.sh
index be199293..853ca7b0 100755
--- a/alltests.sh
+++ b/alltests.sh
@@ -11,7 +11,7 @@ echo "Testing in $ve"
source $ve/26/bin/activate
make --quiet testdata
-for v in 24 25 26 27 31 32 # 23
+for v in 23 24 25 26 27 31 32
do
source $ve/$v/bin/activate
python setup.py -q develop
diff --git a/coverage/execfile.py b/coverage/execfile.py
index a32957c1..01788bb5 100644
--- a/coverage/execfile.py
+++ b/coverage/execfile.py
@@ -14,6 +14,12 @@ except KeyError:
BUILTINS = sys.modules['builtins']
+def rsplit1(s, sep):
+ """The same as s.rsplit(sep, 1), but works in 2.3"""
+ parts = s.split(sep)
+ return sep.join(parts[:-1]), parts[-1]
+
+
def run_python_module(modulename, args):
"""Run a python module, as though with ``python -m name args...``.
@@ -29,7 +35,7 @@ def run_python_module(modulename, args):
# Search for the module - inside its parent package, if any - using
# standard import mechanics.
if '.' in modulename:
- packagename, name = modulename.rsplit('.', 1)
+ packagename, name = rsplit1(modulename, '.')
package = __import__(packagename, glo, loc, ['__path__'])
searchpath = package.__path__
else:
diff --git a/coverage/misc.py b/coverage/misc.py
index 3c02d3eb..6cc42c74 100644
--- a/coverage/misc.py
+++ b/coverage/misc.py
@@ -1,7 +1,8 @@
"""Miscellaneous stuff for Coverage."""
import inspect
-from coverage.backward import md5, string_class, to_bytes
+from coverage.backward import md5, sorted # pylint: disable=W0622
+from coverage.backward import string_class, to_bytes
def nice_pair(pair):