File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 22Selector tests for cssselect backend
33"""
44import unittest
5- from parsel .csstranslator import HTMLTranslator
5+ from parsel .csstranslator import GenericTranslator , HTMLTranslator
66from parsel import Selector
77from cssselect .parser import SelectorSyntaxError
88from cssselect .xpath import ExpressionError
4444'''
4545
4646
47- class TranslatorMixinTest (unittest .TestCase ):
48-
49- tr_cls = HTMLTranslator
47+ class TranslatorTestMixin :
5048
5149 def setUp (self ):
5250 self .tr = self .tr_cls ()
@@ -113,6 +111,14 @@ def test_unknown_pseudo_class(self):
113111 self .assertRaises (exc , self .c2x , css )
114112
115113
114+ class HTMLTranslatorTest (TranslatorTestMixin , unittest .TestCase ):
115+ tr_cls = HTMLTranslator
116+
117+
118+ class GenericTranslatorTest (TranslatorTestMixin , unittest .TestCase ):
119+ tr_cls = GenericTranslator
120+
121+
116122class UtilCss2XPathTest (unittest .TestCase ):
117123 def test_css2xpath (self ):
118124 from parsel import css2xpath
You can’t perform that action at this time.
0 commit comments