[Neo-report] r2232 vincent - in /trunk: neo/tests/functional/__init__.py tools/runner
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Aug 27 10:53:31 CEST 2010
Author: vincent
Date: Fri Aug 27 10:53:30 2010
New Revision: 2232
Log:
Stop accessing private properties.
Modified:
trunk/neo/tests/functional/__init__.py
trunk/tools/runner
Modified: trunk/neo/tests/functional/__init__.py
==============================================================================
--- trunk/neo/tests/functional/__init__.py [iso-8859-1] (original)
+++ trunk/neo/tests/functional/__init__.py [iso-8859-1] Fri Aug 27 10:53:30 2010
@@ -534,10 +534,7 @@ class NEOFunctionalTest(unittest.TestCas
temp_dir = tempfile.mkdtemp(prefix='neo_')
print 'Using temp directory %r.' % (temp_dir, )
# build the full path based on test case and current test method
- test_case_name = self.__class__.__name__
- test_method_name = self._TestCase__testMethodName
- temp_dir = os.path.join(temp_dir, test_case_name)
- temp_dir = os.path.join(temp_dir, test_method_name)
+ temp_dir = os.path.join(temp_dir, self.id())
# build the path if needed
if not os.path.exists(temp_dir):
os.makedirs(temp_dir)
Modified: trunk/tools/runner
==============================================================================
--- trunk/tools/runner [iso-8859-1] (original)
+++ trunk/tools/runner [iso-8859-1] Fri Aug 27 10:53:30 2010
@@ -158,12 +158,11 @@ class NeoTestRunner(unittest.TestResult)
stats.time += time.time() - self.lastStart
def startTest(self, test):
- print ' * %s %s...' % (test.__class__.__module__[10:],
- test._TestCase__testMethodName),
+ module = test.__class__.__name__
+ method = test.id()
+ sys.stdout.write(' * %s ' % (method, ))
sys.stdout.flush()
unittest.TestResult.startTest(self, test)
- module = test.__class__.__name__
- method = test._TestCase__testMethodName
logging.info(" * TEST %s" % test)
stats = self._getModuleStats(test)
stats.run += 1
@@ -252,11 +251,7 @@ class NeoTestRunner(unittest.TestResult)
def _buildErrors(self):
s = '\n'
- test_formatter = lambda t: '%s.py %s.%s' % (
- t.__class__.__module__.replace('.', '/'),
- t.__class__.__name__,
- t._TestCase__testMethodName,
- )
+ test_formatter = lambda t: t.id()
if len(self.errors):
s += '\nERRORS:\n'
for test, trace in self.errors:
More information about the Neo-report
mailing list