add subdir for every test, this makes Tester.py -k easier to use

This commit is contained in:
Stefan Klug 2015-11-03 20:56:31 +01:00
parent 9143d0a517
commit 3beaed5356

View file

@ -111,11 +111,11 @@ class Test:
self.report.say('- Test %s.' % self.data['Name']) self.report.say('- Test %s.' % self.data['Name'])
self.report.say('- %s\n' % self.description) self.report.say('- %s\n' % self.description)
# Prepare test data # Prepare test data
self.tempFolder = os.path.join(self.testFolder, 'temp') self.tempFolder = os.path.join(self.testFolder, 'temp', self.data['Name'])
if os.path.exists(self.tempFolder): if os.path.exists(self.tempFolder):
time.sleep(0.3) # Sometimes I can't remove it, so I wait time.sleep(0.3) # Sometimes I can't remove it, so I wait
FolderDeleter.delete(self.tempFolder) FolderDeleter.delete(self.tempFolder)
os.mkdir(self.tempFolder) os.makedirs(self.tempFolder)
try: try:
self.do() self.do()
self.report.say('Checking result...') self.report.say('Checking result...')