示例#1
0
 def test_get_filepath(self):
     testfile = tempfile.NamedTemporaryFile(prefix='bitten_test')
     config = Configuration(properties={'somepkg.path': testfile.name})
     self.assertEqual(testfile.name, config.get_filepath('somepkg.path'))
示例#2
0
文件: config.py 项目: hefloryd/bitten
 def test_get_filepath(self):
     testfile = tempfile.NamedTemporaryFile(prefix='bitten_test')
     config = Configuration(properties={'somepkg.path': testfile.name})
     self.assertEqual(testfile.name, config.get_filepath('somepkg.path'))
示例#3
0
 def test_get_filepath_non_existant(self):
     testfile, testname = tempfile.mkstemp(prefix='bitten_test')
     os.close(testfile)
     os.remove(testname)
     config = Configuration(properties={'somepkg.path': testname})
     self.assertEqual(None, config.get_filepath('somepkg.path'))
示例#4
0
文件: config.py 项目: hefloryd/bitten
 def test_get_filepath_non_existant(self):
     testfile, testname = tempfile.mkstemp(prefix='bitten_test')
     os.close(testfile)
     os.remove(testname)
     config = Configuration(properties={'somepkg.path': testname})
     self.assertEqual(None, config.get_filepath('somepkg.path'))