test_sqlite_generator.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:PlasoScaffolder 作者: ClaudiaSaxer 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号