mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Now that we have directories in test-data, we better handle that.
This commit is contained in:
parent
d573550e77
commit
7c41187204
@ -128,13 +128,19 @@ class PluginTestCase(SupyTestCase):
|
||||
conf.supybot.reply.whenNotCommand.setValue(False)
|
||||
self.myVerbose = world.myVerbose
|
||||
if self.cleanConfDir:
|
||||
for filename in os.listdir(conf.supybot.directories.conf()):
|
||||
os.remove(os.path.join(conf.supybot.directories.conf(),
|
||||
filename))
|
||||
confDir = conf.supybot.directories.conf()
|
||||
for (dirpath, dirnames, filenames) in os.walk(confDir):
|
||||
for filename in filenames:
|
||||
filename = os.path.join(dirpath, filename)
|
||||
if os.path.isfile(filename):
|
||||
os.remove(filename)
|
||||
if self.cleanDataDir:
|
||||
for filename in os.listdir(conf.supybot.directories.data()):
|
||||
os.remove(os.path.join(conf.supybot.directories.data(),
|
||||
filename))
|
||||
dataDir = conf.supybot.directories.data()
|
||||
for (dirpath, dirnames, filenames) in os.walk(dataDir):
|
||||
for filename in filenames:
|
||||
filename = os.path.join(dirpath, filename)
|
||||
if os.path.isfile(filename):
|
||||
os.remove(filename)
|
||||
ircdb.users.reload()
|
||||
ircdb.ignores.reload()
|
||||
ircdb.channels.reload()
|
||||
|
Loading…
Reference in New Issue
Block a user