コード例 #1
0
ファイル: container.py プロジェクト: GaryMMugford/calibre
 def test_split_file(self):
     " Test splitting of files "
     book = get_split_book()
     c = get_container(book)
     name = "index.html"
     nname = split(c, name, '//*[@id="page2"]')
     root = c.parsed(nname)
     troot = c.parsed(name)
     self.assertEqual(1, len(root.xpath('//*[@id="container"]')), "Split point was not adjusted")
     self.assertEqual(0, len(troot.xpath('//*[@id="container"]')), "Split point was not adjusted")
     self.check_links(c)
コード例 #2
0
ファイル: container.py プロジェクト: yunfile123/calibre
 def test_split_file(self):
     ' Test splitting of files '
     book = get_split_book()
     c = get_container(book)
     name = 'index.html'
     nname = split(c, name, '//*[@id="page2"]')
     root = c.parsed(nname)
     troot = c.parsed(name)
     self.assertEqual(1, len(root.xpath('//*[@id="container"]')), 'Split point was not adjusted')
     self.assertEqual(0, len(troot.xpath('//*[@id="container"]')), 'Split point was not adjusted')
     self.check_links(c)