From 09430ceedbcfc15d5246b5b3e8d44d165fe512f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20A=C5=9F=C4=B1c=C4=B1?= Date: Mon, 5 Jul 2010 13:53:46 +0000 Subject: [PATCH] tests: Remove tmp dir before running tests --- tests/runtests.py | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/tests/runtests.py b/tests/runtests.py index 5eeb50c0..d76f5c12 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright (C) 2007, TUBITAK/UEKAE +# Copyright (C) 2007-2010, TUBITAK/UEKAE # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free @@ -11,6 +11,7 @@ # Please read the COPYING file. # +import os import unittest import database @@ -46,20 +47,11 @@ from utiltest import UtilTestCase from versiontest import VersionTestCase - - - - - - - - - - - - - -suite = unittest.TestSuite() - if __name__ == '__main__': + if os.path.exists("repos/tmp"): + import shutil + shutil.rmtree("repos/tmp") + + suite = unittest.TestSuite() unittest.main() +