diff --git a/django_nose/plugin.py b/django_nose/plugin.py index a7aa5c1..4505ef2 100644 --- a/django_nose/plugin.py +++ b/django_nose/plugin.py @@ -363,7 +363,13 @@ def __init__(self, tests, runner): def setup(self): """Setup database.""" - self.old_names = self.runner.setup_databases() + # temporarily restore sys.stdout in case of propmt to delete database + test_stdout = sys.stdout + sys.stdout = sys.__stdout__ + try: + self.old_names = self.runner.setup_databases() + finally: + sys.stdout = test_stdout def teardown(self): """Tear down database."""