Esempio n. 1
0
 def test_logger(self):
     test_log_dir = utils.get_home_directory() + "logs/"
     test_log = log.get_logger("TEST")
     self.assertEqual("TEST", test_log.name)
     self.assertEqual(test_log.level, 0)
     os.unlink(test_log_dir + "test.log")
Esempio n. 2
0
 def setUp(self):
     home_dir = utils.get_home_directory()
     self.config = config.Config(home_dir + "pyhole.conf", "Pyhole")
Esempio n. 3
0
 def test_logger(self):
     test_log_dir = utils.get_home_directory() + "logs/"
     test_log = log.get_logger("TEST")
     self.assertEqual("TEST", test_log.name)
     self.assertEqual(test_log.level, 0)
     os.unlink(test_log_dir + "test.log")
Esempio n. 4
0
 def test_get_directory(self):
     new_dir = utils.get_home_directory() + "test_dir"
     self.assertFalse(os.path.exists(new_dir))
     utils.get_directory("test_dir")
     self.assertTrue(os.path.exists(new_dir))
     os.rmdir(new_dir)
Esempio n. 5
0
 def setUp(self):
     utils.write_file("tests", "pyhole_test_file", "foo")
     self.new_file = utils.get_home_directory() + "tests/pyhole_test_file"
Esempio n. 6
0
 def test_get_conf_file_path(self):
     conf_file_path = utils.get_conf_file_path()
     actual_conf_file_path = utils.get_home_directory() + "pyhole.conf"
     self.assertEqual(conf_file_path, actual_conf_file_path)
Esempio n. 7
0
 def test_get_home_directory(self):
     self.assertTrue(utils.get_home_directory().endswith("/.pyhole/"))
Esempio n. 8
0
 def test_get_directory(self):
     new_dir = utils.get_home_directory() + "test_dir"
     self.assertFalse(os.path.exists(new_dir))
     utils.get_directory("test_dir")
     self.assertTrue(os.path.exists(new_dir))
     os.rmdir(new_dir)
Esempio n. 9
0
 def test_get_home_directory(self):
     self.assertTrue(utils.get_home_directory().endswith("/.pyhole/"))
Esempio n. 10
0
 def setUp(self):
     utils.write_file("tests", "pyhole_test_file", "foo")
     self.new_file = utils.get_home_directory() + "tests/pyhole_test_file"
Esempio n. 11
0
 def setUp(self):
     home_dir = utils.get_home_directory()
     self.config = config.Config(home_dir + "pyhole.conf", "Pyhole")
Esempio n. 12
0
 def test_get_conf_file_path(self):
     conf_file_path = utils.get_conf_file_path()
     actual_conf_file_path = utils.get_home_directory() + "pyhole.conf"
     self.assertEqual(conf_file_path, actual_conf_file_path)