Skip to content

Commit

Permalink
supybot-test: Ensure --clean doesn't leave 'backup' and 'test-logs' d…
Browse files Browse the repository at this point in the history
…irectories
  • Loading branch information
progval committed Sep 4, 2023
1 parent acad802 commit 8029e2b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/scripts/limnoria_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@
registryFilename = os.path.join('test-conf', 'test.conf')
fd = open(registryFilename, 'w')
fd.write("""
supybot.directories.data: %(base_dir)s/test-data
supybot.directories.backup: /dev/null
supybot.directories.conf: %(base_dir)s/test-conf
supybot.directories.data: %(base_dir)s/test-data
supybot.directories.log: %(base_dir)s/test-logs
supybot.reply.whenNotCommand: True
supybot.log.stdout: False
Expand Down Expand Up @@ -229,8 +230,8 @@ def main():
runner = unittest.TextTestRunner(verbosity=2)
print('Testing began at %s (pid %s)' % (time.ctime(), os.getpid()))
if options.clean:
log.setLevel(100) # don't log anything anymore
shutil.rmtree(conf.supybot.directories.log())
log._mkDirs()
shutil.rmtree(conf.supybot.directories.conf())
shutil.rmtree(conf.supybot.directories.data())
result = runner.run(suite)
Expand Down

0 comments on commit 8029e2b

Please sign in to comment.