We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 774ab32 commit 86c1fe4Copy full SHA for 86c1fe4
Lib/test/test_htmlparser.py
@@ -4,6 +4,8 @@
4
import pprint
5
import unittest
6
7
+from unittest.mock import patch
8
+
9
10
class EventCollector(html.parser.HTMLParser):
11
@@ -787,5 +789,17 @@ def test_weird_chars_in_unquoted_attribute_values(self):
787
789
('starttag', 'form',
788
790
[('action', 'bogus|&#()value')])])
791
792
793
+class TestInheritance(unittest.TestCase):
794
795
+ @patch("_markupbase.ParserBase.__init__")
796
+ @patch("_markupbase.ParserBase.reset")
797
+ def test_init(self, super_init_method, super_reset_method):
798
+ with patch('_markupbase.ParserBase') as parser_base:
799
+ a = html.parser.HTMLParser()
800
+ self.assertTrue(super_init_method.called)
801
+ self.assertTrue(super_reset_method.called)
802
803
804
if __name__ == "__main__":
805
unittest.main()
0 commit comments