[tests] drop debug output
This commit is contained in:
@@ -25,8 +25,6 @@ import tests._misc as _misc
|
||||
class EntropyClientTest(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
sys.stdout.write("%s called\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
self.mem_repoid = "mem_repo"
|
||||
self.mem_repo_desc = "This is a testing repository"
|
||||
self.Client = Client(installed_repo = -1, indexing = False,
|
||||
@@ -43,8 +41,6 @@ class EntropyClientTest(unittest.TestCase):
|
||||
"""
|
||||
tearDown is run after each test
|
||||
"""
|
||||
sys.stdout.write("%s ran\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
# calling destroy() and shutdown()
|
||||
# need to call destroy() directly to remove all the SystemSettings
|
||||
# plugins because shutdown() doesn't, since it's meant to be called
|
||||
@@ -453,5 +449,4 @@ else:
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
entropy.tools.kill_threads()
|
||||
raise SystemExit(0)
|
||||
|
||||
@@ -12,17 +12,6 @@ from entropy.exceptions import SecurityError
|
||||
|
||||
class ConstTest(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
sys.stdout.write("%s called\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
|
||||
def tearDown(self):
|
||||
"""
|
||||
tearDown is run after each test
|
||||
"""
|
||||
sys.stdout.write("%s ran\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
|
||||
def test_privileges(self):
|
||||
|
||||
self.assertTrue(os.getuid() == 0)
|
||||
@@ -47,5 +36,4 @@ class ConstTest(unittest.TestCase):
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
entropy.tools.kill_threads()
|
||||
raise SystemExit(0)
|
||||
|
||||
@@ -11,17 +11,6 @@ import tests._misc as _misc
|
||||
|
||||
class CoreTest(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
sys.stdout.write("%s called\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
|
||||
def tearDown(self):
|
||||
"""
|
||||
tearDown is run after each test
|
||||
"""
|
||||
sys.stdout.write("%s ran\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
|
||||
def test_plugin_store(self):
|
||||
|
||||
store = EntropyPluginStore()
|
||||
@@ -57,5 +46,4 @@ class CoreTest(unittest.TestCase):
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
entropy.tools.kill_threads()
|
||||
raise SystemExit(0)
|
||||
|
||||
@@ -18,11 +18,10 @@ import tests._misc as _misc
|
||||
import entropy.dep
|
||||
import entropy.tools
|
||||
|
||||
|
||||
class EntropyRepositoryTest(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
sys.stdout.write("%s called\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
self.Client = Client(installed_repo = -1, indexing = False,
|
||||
xcache = False, repo_validation = False)
|
||||
self.Spm = self.Client.Spm()
|
||||
@@ -47,8 +46,6 @@ class EntropyRepositoryTest(unittest.TestCase):
|
||||
"""
|
||||
tearDown is run after each test
|
||||
"""
|
||||
sys.stdout.write("%s ran\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
self.test_db.close()
|
||||
self.test_db2.close()
|
||||
# calling destroy() and shutdown()
|
||||
@@ -653,7 +650,11 @@ class EntropyRepositoryTest(unittest.TestCase):
|
||||
fd, buf_file = tempfile.mkstemp()
|
||||
os.close(fd)
|
||||
buf = open(buf_file, "wb")
|
||||
|
||||
set_mute(True)
|
||||
self.test_db.exportRepository(buf)
|
||||
set_mute(False)
|
||||
|
||||
buf.flush()
|
||||
buf.close()
|
||||
|
||||
@@ -1018,5 +1019,4 @@ class EntropyRepositoryTest(unittest.TestCase):
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
entropy.tools.kill_threads()
|
||||
raise SystemExit(0)
|
||||
|
||||
@@ -16,20 +16,11 @@ import entropy.dep as et
|
||||
class DepTest(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
sys.stdout.write("%s called\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
self.test_pkg = _misc.get_test_entropy_package()
|
||||
self.test_pkg2 = _misc.get_test_entropy_package2()
|
||||
self.test_pkg3 = _misc.get_test_entropy_package3()
|
||||
self.test_pkgs = [self.test_pkg, self.test_pkg2, self.test_pkg3]
|
||||
|
||||
def tearDown(self):
|
||||
"""
|
||||
tearDown is run after each test
|
||||
"""
|
||||
sys.stdout.write("%s ran\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
|
||||
def test_valid_package_tag(self):
|
||||
valid = "ciao"
|
||||
invalids = ["òpl", "hello,hello", "#hello"]
|
||||
@@ -264,5 +255,4 @@ class DepTest(unittest.TestCase):
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
et.kill_threads()
|
||||
raise SystemExit(0)
|
||||
|
||||
@@ -12,18 +12,9 @@ import entropy.tools
|
||||
class FetchersTest(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
sys.stdout.write("%s called\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
self._random_file = _misc.get_random_file()
|
||||
self._random_file_md5 = _misc.get_random_file_md5()
|
||||
|
||||
def tearDown(self):
|
||||
"""
|
||||
tearDown is run after each test
|
||||
"""
|
||||
sys.stdout.write("%s ran\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
|
||||
def test_urlfetcher_file_fetch(self):
|
||||
|
||||
file_path = "file://" + os.path.realpath(self._random_file)
|
||||
@@ -58,5 +49,4 @@ class FetchersTest(unittest.TestCase):
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
entropy.tools.kill_threads()
|
||||
raise SystemExit(0)
|
||||
|
||||
@@ -8,14 +8,11 @@ sys.path.insert(0, '../')
|
||||
|
||||
import unittest
|
||||
from entropy.i18n import _, change_language
|
||||
from entropy.output import print_info
|
||||
from entropy.const import const_convert_to_unicode
|
||||
|
||||
class MiscTest(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
sys.stdout.write("%s called\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
self._backup_language = os.environ.get("LANGUAGE", '')
|
||||
self._words_to_test = [
|
||||
"Yes", "No", "database already exists",
|
||||
@@ -67,8 +64,6 @@ class MiscTest(unittest.TestCase):
|
||||
tearDown is run after each test
|
||||
"""
|
||||
change_language(self._backup_language)
|
||||
sys.stdout.write("%s ran\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
|
||||
def _assert_word(self, untranslated, translated):
|
||||
lang = os.environ.get("LANGUAGE")
|
||||
@@ -80,8 +75,6 @@ class MiscTest(unittest.TestCase):
|
||||
def __do_print(self):
|
||||
for word in self._words_to_test:
|
||||
tword = _(word)
|
||||
print_info("%s [%s]: %s" % (
|
||||
r"test", os.environ.get("LANGUAGE"), tword,))
|
||||
self._assert_word(word, tword)
|
||||
|
||||
def test_1_italian(self):
|
||||
@@ -104,12 +97,7 @@ class MiscTest(unittest.TestCase):
|
||||
change_language('de_DE')
|
||||
self.__do_print()
|
||||
|
||||
#def test_i18n_func(self):
|
||||
# pass
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
entropy.tools.kill_threads()
|
||||
raise SystemExit(0)
|
||||
|
||||
@@ -13,8 +13,6 @@ from entropy.misc import Lifo, TimeScheduled, ParallelTask, EmailSender, \
|
||||
class MiscTest(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
sys.stdout.write("%s called\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
self.__lifo = Lifo()
|
||||
self._lifo_item1 = set([1, 2, 3, 4])
|
||||
self._lifo_item2 = set([1, 2, 3, 4])
|
||||
@@ -26,13 +24,6 @@ class MiscTest(unittest.TestCase):
|
||||
self._lifo_item3, self._lifo_item4, self._lifo_item5,
|
||||
self._lifo_item6]
|
||||
|
||||
def tearDown(self):
|
||||
"""
|
||||
tearDown is run after each test
|
||||
"""
|
||||
sys.stdout.write("%s ran\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
|
||||
def test_lifo_push_pop(self):
|
||||
|
||||
# test push
|
||||
@@ -95,13 +86,10 @@ class MiscTest(unittest.TestCase):
|
||||
import time
|
||||
time.sleep(1)
|
||||
self.t_sched_run = True
|
||||
#print "parallel done"
|
||||
|
||||
t = ParallelTask(do_t)
|
||||
t.start()
|
||||
#print "joining"
|
||||
t.join()
|
||||
#print "joined"
|
||||
self.assertTrue(self.t_sched_run)
|
||||
|
||||
def test_flock_file(self):
|
||||
@@ -249,5 +237,4 @@ class MiscTest(unittest.TestCase):
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
entropy.tools.kill_threads()
|
||||
raise SystemExit(0)
|
||||
|
||||
@@ -12,18 +12,9 @@ import tempfile
|
||||
class QATest(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
sys.stdout.write("%s called\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
text = TextInterface()
|
||||
self.QA = entropy.qa.QAInterface()
|
||||
|
||||
def tearDown(self):
|
||||
"""
|
||||
tearDown is run after each test
|
||||
"""
|
||||
sys.stdout.write("%s ran\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
|
||||
def test_package_qa(self):
|
||||
pkgs = [_misc.get_test_entropy_package4(),
|
||||
_misc.get_test_entropy_package3(),
|
||||
@@ -35,5 +26,4 @@ class QATest(unittest.TestCase):
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
entropy.tools.kill_threads()
|
||||
raise SystemExit(0)
|
||||
|
||||
@@ -35,9 +35,6 @@ class SecurityTest(unittest.TestCase):
|
||||
self._system = System(self._entropy)
|
||||
# set fake security url
|
||||
|
||||
sys.stdout.write("%s called\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
|
||||
def tearDown(self):
|
||||
"""
|
||||
tearDown is run after each test
|
||||
@@ -54,8 +51,6 @@ class SecurityTest(unittest.TestCase):
|
||||
shutil.rmtree(self._tmp_dir, True)
|
||||
shutil.rmtree(self._security_dir, True)
|
||||
shutil.rmtree(self._security_cache_dir, True)
|
||||
sys.stdout.write("%s ran\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
|
||||
def test_security_get_advisories_cache(self):
|
||||
self.assertEqual(self._system.get_advisories_cache(), None)
|
||||
@@ -131,5 +126,4 @@ class SecurityTest(unittest.TestCase):
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
entropy.tools.kill_threads()
|
||||
raise SystemExit(0)
|
||||
|
||||
@@ -17,8 +17,6 @@ import tests._misc as _misc
|
||||
class EntropyRepositoryTest(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
sys.stdout.write("%s called\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
self.default_repo = "foo"
|
||||
etpConst['defaultserverrepositoryid'] = self.default_repo
|
||||
etpConst['uid'] = 0
|
||||
@@ -36,8 +34,6 @@ class EntropyRepositoryTest(unittest.TestCase):
|
||||
tearDown is run after each test
|
||||
"""
|
||||
self.Server.remove_repository(self.default_repo)
|
||||
sys.stdout.write("%s ran\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
# calling destroy() and shutdown()
|
||||
# need to call destroy() directly to remove all the SystemSettings
|
||||
# plugins because shutdown() doesn't, since it's meant to be called
|
||||
@@ -169,5 +165,4 @@ class EntropyRepositoryTest(unittest.TestCase):
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
entropy.tools.kill_threads()
|
||||
raise SystemExit(0)
|
||||
|
||||
@@ -16,8 +16,6 @@ from entropy.spm.plugins.interfaces.portage_plugin import \
|
||||
class SpmTest(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
sys.stdout.write("%s called\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
self.Client = Client(installed_repo = -1, indexing = False,
|
||||
xcache = False, repo_validation = False)
|
||||
self.test_pkg = _misc.get_test_entropy_package()
|
||||
@@ -29,8 +27,6 @@ class SpmTest(unittest.TestCase):
|
||||
"""
|
||||
tearDown is run after each test
|
||||
"""
|
||||
sys.stdout.write("%s ran\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
# calling destroy() and shutdown()
|
||||
# need to call destroy() directly to remove all the SystemSettings
|
||||
# plugins because shutdown() doesn't, since it's meant to be called
|
||||
@@ -318,5 +314,4 @@ class SpmTest(unittest.TestCase):
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
et.kill_threads()
|
||||
raise SystemExit(0)
|
||||
|
||||
@@ -17,20 +17,11 @@ import stat
|
||||
class ToolsTest(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
sys.stdout.write("%s called\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
self.test_pkg = _misc.get_test_entropy_package()
|
||||
self.test_pkg2 = _misc.get_test_entropy_package2()
|
||||
self.test_pkg3 = _misc.get_test_entropy_package3()
|
||||
self.test_pkgs = [self.test_pkg, self.test_pkg2, self.test_pkg3]
|
||||
|
||||
def tearDown(self):
|
||||
"""
|
||||
tearDown is run after each test
|
||||
"""
|
||||
sys.stdout.write("%s ran\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
|
||||
def test_dump_entropy_metadata(self):
|
||||
|
||||
client = Client(installed_repo = -1, indexing = False, xcache = False,
|
||||
@@ -647,5 +638,4 @@ class ToolsTest(unittest.TestCase):
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
et.kill_threads()
|
||||
raise SystemExit(0)
|
||||
|
||||
Reference in New Issue
Block a user