Commit 5f7c8d09 authored by Vincent Pelletier's avatar Vincent Pelletier

Stop accessing private properties.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2232 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent bd2b4512
......@@ -534,10 +534,7 @@ class NEOFunctionalTest(unittest.TestCase):
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)
......
......@@ -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:
......
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