renaming tests are now possible outside of renaming.py

This commit is contained in:
David Halter
2013-05-01 21:07:37 +04:30
parent f5aaeaa428
commit 01be114386

View File

@@ -126,6 +126,10 @@ class IntegrationTestCase(object):
self.path = path self.path = path
self.skip = None self.skip = None
@property
def module_name(self):
return re.sub('.*/|\.py', '', self.path)
def __repr__(self): def __repr__(self):
name = os.path.basename(self.path) if self.path else None name = os.path.basename(self.path) if self.path else None
return '<%s: %s:%s:%s>' % (self.__class__.__name__, return '<%s: %s:%s:%s>' % (self.__class__.__name__,
@@ -203,7 +207,7 @@ class IntegrationTestCase(object):
# this means that there is a module specified # this means that there is a module specified
wanted.append(pos_tup) wanted.append(pos_tup)
else: else:
wanted.append(('renaming', self.line_nr + pos_tup[0], wanted.append((self.module_name, self.line_nr + pos_tup[0],
pos_tup[1])) pos_tup[1]))
return compare_cb(self, compare, sorted(wanted)) return compare_cb(self, compare, sorted(wanted))