コード例 #1
0
ファイル: test_index.py プロジェクト: takuyozora/patacrep
 def test_index(self):
     """Test that `foo.sxd` produces the correct sbx file"""
     generated_index = process_sxd(base + ".sxd").entries_to_str()
     with codecs.open(base + ".sbx", "r", "utf-8") as control_index:
         self.assertEqual(
             control_index.read(),
             generated_index,
         )
コード例 #2
0
ファイル: build.py プロジェクト: tintou/patacrep
 def build_sbx(self):
     """Make index"""
     LOGGER.info("Building indexes…")
     sxd_files = glob.glob("%s_*.sxd" % self.basename)
     for sxd_file in sxd_files:
         LOGGER.debug("Processing " + sxd_file)
         idx = process_sxd(sxd_file)
         with codecs.open(sxd_file[:-3] + "sbx", "w", "utf-8") as index_file:
             index_file.write(idx.entries_to_str())
コード例 #3
0
 def build_sbx(self):
     """Make .sbx indexes from .sxd files"""
     LOGGER.info("Building .sbx indexes…")
     sxd_files = glob.glob("%s_*.sxd" % self.basename)
     for sxd_file in sxd_files:
         LOGGER.debug("Processing " + sxd_file)
         idx = process_sxd(sxd_file)
         with codecs.open(sxd_file[:-3] + "sbx", "w", "utf-8") as index_file:
             index_file.write(idx.entries_to_str())
コード例 #4
0
ファイル: test_index.py プロジェクト: patacrep/patacrep
 def test_index(self):
     """Test that `foo.sxd` produces the correct sbx file"""
     generated_index = process_sxd(base + ".sxd").entries_to_str()
     with codecs.open(base + ".sbx", "r", "utf-8") as control_index:
         self.assertEqual(control_index.read(), generated_index, )