mirror of
https://github.com/moparisthebest/SickRage
synced 2024-11-16 22:35:03 -05:00
0d9fbc1ad7
This version of SickBeard uses both TVDB and TVRage to search and gather it's series data from allowing you to now have access to and download shows that you couldn't before because of being locked into only what TheTVDB had to offer. Also this edition is based off the code we used in our XEM editon so it does come with scene numbering support as well as all the other features our XEM edition has to offer. Please before using this with your existing database (sickbeard.db) please make a backup copy of it and delete any other database files such as cache.db and failed.db if present, we HIGHLY recommend starting out with no database files at all to make this a fresh start but the choice is at your own risk! Enjoy!
40 lines
1.2 KiB
Python
40 lines
1.2 KiB
Python
import support
|
|
from html5lib import html5parser
|
|
from html5lib.constants import namespaces
|
|
from html5lib.treebuilders import dom
|
|
|
|
import unittest
|
|
|
|
# tests that aren't autogenerated from text files
|
|
class MoreParserTests(unittest.TestCase):
|
|
|
|
def test_assertDoctypeCloneable(self):
|
|
parser = html5parser.HTMLParser(tree=dom.TreeBuilder)
|
|
doc = parser.parse('<!DOCTYPE HTML>')
|
|
self.assert_(doc.cloneNode(True))
|
|
|
|
def test_line_counter(self):
|
|
# http://groups.google.com/group/html5lib-discuss/browse_frm/thread/f4f00e4a2f26d5c0
|
|
parser = html5parser.HTMLParser(tree=dom.TreeBuilder)
|
|
parser.parse("<pre>\nx\n>\n</pre>")
|
|
|
|
def test_namespace_html_elements_0(self):
|
|
parser = html5parser.HTMLParser(namespaceHTMLElements=True)
|
|
doc = parser.parse("<html></html>")
|
|
self.assert_(doc.childNodes[0].namespace == namespaces["html"])
|
|
|
|
def test_namespace_html_elements_1(self):
|
|
parser = html5parser.HTMLParser(namespaceHTMLElements=False)
|
|
doc = parser.parse("<html></html>")
|
|
self.assert_(doc.childNodes[0].namespace == None)
|
|
|
|
def buildTestSuite():
|
|
return unittest.defaultTestLoader.loadTestsFromName(__name__)
|
|
|
|
def main():
|
|
buildTestSuite()
|
|
unittest.main()
|
|
|
|
if __name__ == '__main__':
|
|
main()
|