예제 #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'))