Commit f9159069 authored by Stefan Behnel's avatar Stefan Behnel

Avoid old-style classes in test runner under Py2.

parent 7cd06bea
...@@ -1576,7 +1576,8 @@ class EmbedTest(unittest.TestCase): ...@@ -1576,7 +1576,8 @@ class EmbedTest(unittest.TestCase):
except OSError: except OSError:
pass pass
class MissingDependencyExcluder:
class MissingDependencyExcluder(object):
def __init__(self, deps): def __init__(self, deps):
# deps: { matcher func : module name } # deps: { matcher func : module name }
self.exclude_matchers = [] self.exclude_matchers = []
...@@ -1593,7 +1594,8 @@ class MissingDependencyExcluder: ...@@ -1593,7 +1594,8 @@ class MissingDependencyExcluder:
return True return True
return False return False
class VersionDependencyExcluder:
class VersionDependencyExcluder(object):
def __init__(self, deps): def __init__(self, deps):
# deps: { version : matcher func } # deps: { version : matcher func }
from sys import version_info from sys import version_info
...@@ -1610,8 +1612,7 @@ class VersionDependencyExcluder: ...@@ -1610,8 +1612,7 @@ class VersionDependencyExcluder:
return False return False
class FileListExcluder: class FileListExcluder(object):
def __init__(self, list_file, verbose=False): def __init__(self, list_file, verbose=False):
self.verbose = verbose self.verbose = verbose
self.excludes = {} self.excludes = {}
...@@ -1631,8 +1632,7 @@ class FileListExcluder: ...@@ -1631,8 +1632,7 @@ class FileListExcluder:
return exclude return exclude
class TagsSelector: class TagsSelector(object):
def __init__(self, tag, value): def __init__(self, tag, value):
self.tag = tag self.tag = tag
self.value = value self.value = value
...@@ -1643,8 +1643,8 @@ class TagsSelector: ...@@ -1643,8 +1643,8 @@ class TagsSelector:
else: else:
return self.value in tags[self.tag] return self.value in tags[self.tag]
class RegExSelector:
class RegExSelector(object):
def __init__(self, pattern_string): def __init__(self, pattern_string):
try: try:
self.pattern = re.compile(pattern_string, re.I|re.U) self.pattern = re.compile(pattern_string, re.I|re.U)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment