Beispiel #1
0
 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,
         )
Beispiel #2
0
 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())
Beispiel #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())
Beispiel #4
0
 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, )