File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 4
4
import pprint
5
5
import unittest
6
6
7
+ from unittest .mock import patch
8
+
7
9
8
10
class EventCollector (html .parser .HTMLParser ):
9
11
@@ -787,5 +789,17 @@ def test_weird_chars_in_unquoted_attribute_values(self):
787
789
('starttag' , 'form' ,
788
790
[('action' , 'bogus|&#()value' )])])
789
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
+
790
804
if __name__ == "__main__" :
791
805
unittest .main ()
You can’t perform that action at this time.
0 commit comments