def testPrintCopy(self):
"""test the print for a copy"""
with tempfile.TemporaryDirectory() as tmpdir:
fake_path_helper = \
fake_sqlite_plugin_path_helper.FakeSQLitePluginPathHelper(
self.template_path, 'test',
'db')
path = os.path.join(tmpdir, 'testfile')
generator = sqlite_generator.SQLiteGenerator(
tmpdir, 'test', 'test', ['test'],
output_handler_file.OutputHandlerFile(path,
file_handler.FileHandler()),
self.plugin_helper, fake_path_helper)
generator._PrintCopy(path) # pylint: disable=protected-access
expected = "copy " + path
actual = self._ReadFromFile(path)
self.assertEqual(expected, actual)
test_sqlite_generator.py 文件源码
python
阅读 24
收藏 0
点赞 0
评论 0
评论列表
文章目录