jaraco / cssutils

GNU Lesser General Public License v3.0
78 stars 19 forks source link

2.9.0: pytest fails in 5 units #44

Closed kloczek closed 6 months ago

kloczek commented 6 months ago

I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

Here is pytest output: ```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-cssutils-2.9.0-2.fc36.x86_64/usr/lib64/python3.9/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-cssutils-2.9.0-2.fc36.x86_64/usr/lib/python3.9/site-packages + /usr/bin/pytest -ra -m 'not network' ============================= test session starts ============================== platform linux -- Python 3.9.18, pytest-8.1.1, pluggy-1.4.0 rootdir: /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0 configfile: pytest.ini plugins: jaraco.test-5.3.0 collected 456 items cssutils/__init__.py . [ 0%] cssutils/css/cssstyledeclaration.py .... [ 1%] cssutils/tests/test_codec.py ...... [ 2%] cssutils/tests/test_csscharsetrule.py .......... [ 4%] cssutils/tests/test_csscomment.py ....... [ 6%] cssutils/tests/test_cssfontfacerule.py ........... [ 8%] cssutils/tests/test_cssimportrule.py .............. [ 11%] cssutils/tests/test_cssmediarule.py ................. [ 15%] cssutils/tests/test_cssnamespacerule.py .......... [ 17%] cssutils/tests/test_csspagerule.py .............. [ 20%] cssutils/tests/test_cssproperties.py ... [ 21%] cssutils/tests/test_cssrule.py .... [ 22%] cssutils/tests/test_cssrulelist.py .. [ 22%] cssutils/tests/test_cssstyledeclaration.py ........................ [ 27%] cssutils/tests/test_cssstylerule.py ............ [ 30%] cssutils/tests/test_cssstylesheet.py ............................ [ 36%] cssutils/tests/test_cssunknownrule.py ....... [ 38%] cssutils/tests/test_cssutils.py ........ [ 39%] cssutils/tests/test_cssutilsimport.py . [ 40%] cssutils/tests/test_cssvalue.py xxxxXxxxxxxxxxxxxxxxx [ 44%] cssutils/tests/test_cssvariablesdeclaration.py ......... [ 46%] cssutils/tests/test_cssvariablesrule.py .......... [ 48%] cssutils/tests/test_domimplementation.py FFFF [ 49%] cssutils/tests/test_encutils.py ....... [ 51%] cssutils/tests/test_errorhandler.py .... [ 52%] cssutils/tests/test_helper.py ..... [ 53%] cssutils/tests/test_marginrule.py ........ [ 55%] cssutils/tests/test_medialist.py ......... [ 57%] cssutils/tests/test_mediaquery.py .... [ 57%] cssutils/tests/test_parse.py .............. [ 60%] cssutils/tests/test_prodparser.py ................. [ 64%] cssutils/tests/test_profiles.py ........xxxxxx.............xxxxx [ 71%] cssutils/tests/test_properties.py .. [ 72%] cssutils/tests/test_property.py ........ [ 73%] cssutils/tests/test_scripts_csscombine.py .. [ 74%] cssutils/tests/test_selector.py ........ [ 76%] cssutils/tests/test_selectorlist.py ..... [ 77%] cssutils/tests/test_serialize.py ............................. [ 83%] cssutils/tests/test_settings.py . [ 83%] cssutils/tests/test_stylesheet.py . [ 83%] cssutils/tests/test_tokenize2.py ............. [ 86%] cssutils/tests/test_util.py ..................... [ 91%] cssutils/tests/test_value.py .F...................xxxxxxxxxx [ 98%] cssutils/tests/test_x.py x [ 98%] encutils/__init__.py . [ 98%] examples/website.py ...... [100%] =================================== FAILURES =================================== ________________ TestDOMImplementation.test_createCSSStyleSheet ________________ self = def test_createCSSStyleSheet(self): "DOMImplementationCSS.createCSSStyleSheet()" title, media = 'Test Title', cssutils.stylesheets.MediaList('all') with warnings.catch_warnings(): warnings.simplefilter('ignore') > sheet = self.domimpl.createCSSStyleSheet(title, media) E AttributeError: 'TestDOMImplementation' object has no attribute 'domimpl' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_domimplementation.py:19: AttributeError __________________ TestDOMImplementation.test_createDocument ___________________ self = def test_createDocument(self): "DOMImplementationCSS.createDocument()" > doc = self.domimpl.createDocument(None, None, None) E AttributeError: 'TestDOMImplementation' object has no attribute 'domimpl' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_domimplementation.py:26: AttributeError ________________ TestDOMImplementation.test_createDocumentType _________________ self = def test_createDocumentType(self): "DOMImplementationCSS.createDocumentType()" > doctype = self.domimpl.createDocumentType('foo', 'bar', 'raboof') E AttributeError: 'TestDOMImplementation' object has no attribute 'domimpl' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_domimplementation.py:31: AttributeError ____________________ TestDOMImplementation.test_hasFeature _____________________ self = def test_hasFeature(self): "DOMImplementationCSS.hasFeature()" tests = [ ('css', '1.0'), ('css', '2.0'), ('stylesheets', '1.0'), ('stylesheets', '2.0'), ] for name, version in tests: > assert self.domimpl.hasFeature(name, version) E AttributeError: 'TestDOMImplementation' object has no attribute 'domimpl' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_domimplementation.py:43: AttributeError ________________________ TestPropertyValue.test_cssText ________________________ self = def test_cssText(self): "PropertyValue.cssText" tests = { '0': (None, 1, None), '0 0': (None, 2, None), '0, 0': (None, 2, None), '0,0': ('0, 0', 2, None), '0 , 0': ('0, 0', 2, None), '0/0': (None, 2, None), '/**/ 0 /**/': (None, 1, '0'), '0 /**/ 0 /**/ 0': (None, 3, '0 0 0'), '0, /**/ 0, /**/ 0': (None, 3, '0, 0, 0'), '0//**/ 0//**/ 0': (None, 3, '0/0/0'), '/**/ red': (None, 1, 'red'), '/**/red': ('/**/ red', 1, 'red'), 'red /**/': (None, 1, 'red'), 'red/**/': ('red /**/', 1, 'red'), 'a()1,-1,+1,1%,-1%,1px,-1px,"a",a,url(a),#aabb44': ( 'a() 1, -1, +1, 1%, -1%, 1px, -1px, "a", a, url(a), #ab4', 12, 'a() 1, -1, +1, 1%, -1%, 1px, -1px, "a", a, url(a), #ab4', ), # calc values 'calc(1)': (None, 1, 'calc(1)'), 'calc( 1)': ('calc(1)', 1, 'calc(1)'), 'calc(1 )': ('calc(1)', 1, 'calc(1)'), 'calc(1px)': (None, 1, 'calc(1px)'), 'calc(1p-x-)': (None, 1, 'calc(1p-x-)'), 'calc(1%)': (None, 1, 'calc(1%)'), 'calc(-1)': (None, 1, 'calc(-1)'), 'calc(+1)': (None, 1, 'calc(+1)'), 'calc(1 + 1px)': ('calc(1 + 1px)', 1, 'calc(1 + 1px)'), 'calc(1 - 1px)': (None, 1, 'calc(1 - 1px)'), 'calc(1*1px)': ('calc(1 * 1px)', 1, 'calc(1 * 1px)'), 'calc(1 / 1px)': ('calc(1 / 1px)', 1, 'calc(1 / 1px)'), 'calc( 1*1px)': ('calc(1 * 1px)', 1, 'calc(1 * 1px)'), 'calc( 1 / 1px)': ('calc(1 / 1px)', 1, 'calc(1 / 1px)'), 'calc(1*1px )': ('calc(1 * 1px)', 1, 'calc(1 * 1px)'), 'calc(1 / 1px )': ('calc(1 / 1px)', 1, 'calc(1 / 1px)'), 'calc( 1*1px )': ('calc(1 * 1px)', 1, 'calc(1 * 1px)'), 'calc( 1 / 1px )': ('calc(1 / 1px)', 1, 'calc(1 / 1px)'), 'calc(calc(1px + 5px) * 4)': ( 'calc(calc(1px + 5px) * 4)', 1, 'calc(calc(1px + 5px) * 4)', ), 'calc( calc(1px + 5px)*4 )': ( 'calc(calc(1px + 5px) * 4)', 1, 'calc(calc(1px + 5px) * 4)', ), 'calc(var(X))': (None, 1, None), 'calc(2 * var(X))': (None, 1, None), 'calc(2px + var(X))': (None, 1, None), # issue #24 'rgb(0, 10, 255)': (None, 1, 'rgb(0, 10, 255)'), 'hsl(10, 10%, 25%)': (None, 1, 'hsl(10, 10%, 25%)'), 'rgba(0, 10, 255, 0.5)': (None, 1, 'rgba(0, 10, 255, 0.5)'), 'hsla(10, 10%, 25%, 0.5)': (None, 1, 'hsla(10, 10%, 25%, 0.5)'), # issue #27 'matrix(0.000092, 0.2500010, -0.250000, 0.000092, 0, 0)': ( 'matrix(0.000092, 0.250001, -0.25, 0.000092, 0, 0)', 1, 'matrix(0.000092, 0.250001, -0.25, 0.000092, 0, 0)', ), } for cssText, (c, len, v) in list(tests.items()): if c is None: c = cssText if v is None: v = c pv = cssutils.css.PropertyValue(cssText) assert c == pv.cssText assert len == pv.length assert v == pv.value tests = { '0 0px -0px +0px': ('0 0 0 0', 4), '1 2 3 4': (None, 4), '-1 -2 -3 -4': (None, 4), '-1 2': (None, 2), '-1px red "x"': (None, 3), 'a, b c': (None, 3), '1px1 2% 3': ('1px1 2% 3', 3), 'f(+1pX, -2, 5%) 1': ('f(+1px, -2, 5%) 1', 2), '0 f()0': ('0 f() 0', 3), 'f()0': ('f() 0', 2), 'f()1%': ('f() 1%', 2), 'f()1px': ('f() 1px', 2), 'f()"str"': ('f() "str"', 2), 'f()ident': ('f() ident', 2), 'f()#123': ('f() #123', 2), 'f()url()': ('f() url()', 2), 'f()f()': ('f() f()', 2), 'url(x.gif)0 0': ('url(x.gif) 0 0', 3), 'url(x.gif)no-repeat': ('url(x.gif) no-repeat', 2), } for cssText, (c, len) in list(tests.items()): if c is None: c = cssText pv = cssutils.css.PropertyValue(cssText) assert c == pv.cssText assert len == pv.length tests = { # hash and rgb/a '#112234': '#112234', '#112233': '#123', 'rgb(1,2,3)': 'rgb(1, 2, 3)', 'rgb( 1 , 2 , 3 )': 'rgb(1, 2, 3)', 'rgba(1,2,3,4)': 'rgba(1, 2, 3, 4)', 'rgba( 1 , 2 , 3 , 4 )': 'rgba(1, 2, 3, 4)', 'rgb(-1,+2,0)': 'rgb(-1, +2, 0)', 'rgba(-1,+2,0, 0)': 'rgba(-1, +2, 0, 0)', # FUNCTION 'f(1,2)': 'f(1, 2)', 'f( 1 , 2 )': 'f(1, 2)', 'f(-1,+2)': 'f(-1, +2)', 'f( -1 , +2 )': 'f(-1, +2)', 'fun( -1 , +2 )': 'fun(-1, +2)', 'local( x )': 'local(x)', 'test(1px, #111, y, 1, 1%, "1", y(), var(x))': 'test(1px, #111, y, 1, 1%, "1", y(), var(x))', 'test(-1px, #111, y, -1, -1%, "1", -y())': 'test(-1px, #111, y, -1, -1%, "1", -y())', 'url(y) format( "x" , "y" )': 'url(y) format("x", "y")', 'f(1 2,3 4)': 'f(1 2, 3 4)', # IE expression r'Expression()': 'Expression()', r'expression(-1 < +2)': 'expression(-1<+2)', r'expression(document.width == "1")': 'expression(document.width=="1")', 'alpha(opacity=80)': 'alpha(opacity=80)', 'alpha( opacity = 80 , x=2 )': 'alpha(opacity=80, x=2)', 'expression(eval(document.documentElement.scrollTop))': 'expression(eval(document.documentElement.scrollTop))', # TODO # u'expression((function(ele){ele.style.behavior="none";})(this))': # u'expression((function(ele){ele.style.behavior="none";})(this))', # unicode-range 'u+f': 'u+f', 'U+ABCdef': 'u+abcdef', # url 'url(a)': 'url(a)', 'uRl(a)': 'url(a)', 'u\\rl(a)': 'url(a)', 'url("a")': 'url(a)', 'url( "a" )': 'url(a)', 'url(";")': 'url(";")', 'url(",")': 'url(",")', 'url(")")': 'url(")")', '''url("'")''': '''url("'")''', '''url('"')''': '''url("\\"")''', # operator '1': '1', '1 2': '1 2', '1 2': '1 2', '1,2': '1, 2', '1, 2': '1, 2', '1 ,2': '1, 2', '1 , 2': '1, 2', '1/2': '1/2', '1/ 2': '1/2', '1 /2': '1/2', '1 / 2': '1/2', # comment '1/**/2': '1 /**/ 2', '1 /**/2': '1 /**/ 2', '1/**/ 2': '1 /**/ 2', '1 /**/ 2': '1 /**/ 2', '1 /*a*/ /*b*/ 2': '1 /*a*/ /*b*/ 2', # , before '1,/**/2': '1, /**/ 2', '1 ,/**/2': '1, /**/ 2', '1, /**/2': '1, /**/ 2', '1 , /**/2': '1, /**/ 2', # , after '1/**/,2': '1 /**/, 2', '1/**/ ,2': '1 /**/, 2', '1/**/, 2': '1 /**/, 2', '1/**/ , 2': '1 /**/, 2', # all '1/*a*/ ,/*b*/ 2': '1 /*a*/, /*b*/ 2', '1 /*a*/, /*b*/2': '1 /*a*/, /*b*/ 2', '1 /*a*/ , /*b*/ 2': '1 /*a*/, /*b*/ 2', # list 'a b1,b2 b2,b3,b4': 'a b1, b2 b2, b3, b4', 'a b1 , b2 b2 , b3 , b4': 'a b1, b2 b2, b3, b4', 'u+1 , u+2-5': 'u+1, u+2-5', 'local( x ), url(y) format( "x" , "y" )': 'local(x), url(y) format("x", "y")', # FUNCTION 'attr( href )': 'attr(href)', # PrinceXML extende FUNC syntax with nested FUNC 'target-counter(attr(href),page)': 'target-counter(attr(href), page)', } > self.do_equal_r(tests) /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_value.py:230: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = tests = {'#112233': '#123', '#112234': '#112234', '1': '1', '1 2': '1 2', ...} att = 'cssText' def do_equal_r(self, tests, att='cssText'): # set attribute att of self.r and assert Equal for test, expected in tests.items(): > self.r.__setattr__(att, test) E AttributeError: 'TestPropertyValue' object has no attribute 'r' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/basetest.py:41: AttributeError ================================== XFAILURES =================================== ____________________________ TestCSSValue.test_init ____________________________ self = def test_init(self): "CSSValue.__init__()" > v = cssutils.css.CSSValue() E AttributeError: module 'cssutils.css' has no attribute 'CSSValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_cssvalue.py:20: AttributeError __________________________ TestCSSValue.test_escapes ___________________________ self = def test_escapes(self): "CSSValue Escapes" > v = cssutils.css.CSSValue() E AttributeError: module 'cssutils.css' has no attribute 'CSSValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_cssvalue.py:27: AttributeError __________________________ TestCSSValue.test_cssText ___________________________ self = def test_cssText(self): "CSSValue.cssText" > v = cssutils.css.CSSValue() E AttributeError: module 'cssutils.css' has no attribute 'CSSValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_cssvalue.py:45: AttributeError __________________________ TestCSSValue.test_cssText2 __________________________ self = def test_cssText2(self): "CSSValue.cssText 2" tests = { # mix 'a()1,-1,+1,1%,-1%,1px,-1px,"a",a,url(a),#aabb44': 'a() 1, -1, 1, 1%, -1%, 1px, -1px, "a", a, url(a), #ab4', # S or COMMENT 'red': 'red', 'red ': 'red', ' red ': 'red', '/**/red': '/**/ red', 'red/**/': 'red /**/', '/**/red/**/': '/**/ red /**/', '/**/ red': '/**/ red', 'red /**/': 'red /**/', '/**/ red /**/': '/**/ red /**/', 'red-': 'red-', # num / dimension '.0': '0', '0': '0', '0.0': '0', '00': '0', '0%': '0%', '0px': '0', '-.0': '0', '-0': '0', '-0.0': '0', '-00': '0', '-0%': '0%', '-0px': '0', '+.0': '0', '+0': '0', '+0.0': '0', '+00': '0', '+0%': '0%', '+0px': '0', '1': '1', '1.0': '1', '1px': '1px', '1%': '1%', '1px1': '1px1', '+1': '1', '-1': '-1', '+1.0': '1', '-1.0': '-1', # string, escaped nl is removed during tokenizing '"x"': '"x"', "'x'": '"x"', # ur''' "1\'2" ''': u'''"1'2"''', #??? # ur"'x\"'": ur'"x\""', #??? r'''"x\ y"''': '''"xy"''', # hash and rgb/a '#112234': '#112234', '#112233': '#123', 'rgb(1,2,3)': 'rgb(1, 2, 3)', 'rgb( 1 , 2 , 3 )': 'rgb(1, 2, 3)', 'rgb(-1,+2,0)': 'rgb(-1, 2, 0)', 'rgba(1,2,3,4)': 'rgba(1, 2, 3, 4)', 'rgba( 1 , 2 , 3 , 4 )': 'rgba(1, 2, 3, 4)', 'rgba(-1,+2,0, 0)': 'rgba(-1, 2, 0, 0)', # FUNCTION 'f(1,2)': 'f(1, 2)', 'f( 1 , 2 )': 'f(1, 2)', 'f(-1,+2)': 'f(-1, 2)', 'f( -1 , +2 )': 'f(-1, 2)', 'fun( -1 , +2 )': 'fun(-1, 2)', 'local( x )': 'local(x)', 'test(1px, #111, y, 1, 1%, "1", y(), var(x))': 'test(1px, #111, y, 1, 1%, "1", y(), var(x))', 'test(-1px, #111, y, -1, -1%, "1", -y())': 'test(-1px, #111, y, -1, -1%, "1", -y())', 'url(y) format( "x" , "y" )': 'url(y) format("x", "y")', 'f(1 2,3 4)': 'f(1 2, 3 4)', # IE expression r'Expression()': 'Expression()', r'expression(-1 < +2)': 'expression(-1< + 2)', r'expression(document.width == "1")': 'expression(document.width=="1")', 'alpha(opacity=80)': 'alpha(opacity=80)', 'alpha( opacity = 80 , x=2 )': 'alpha(opacity=80, x=2)', # unicode-range 'u+f': 'u+f', 'U+ABCdef': 'u+abcdef', # url 'url(a)': 'url(a)', 'uRl(a)': 'url(a)', 'u\\rl(a)': 'url(a)', 'url("a")': 'url(a)', 'url( "a" )': 'url(a)', 'url(";")': 'url(";")', 'url(",")': 'url(",")', 'url(")")': 'url(")")', '''url("'")''': '''url("'")''', '''url('"')''': '''url("\\"")''', '1 2': '1 2', '1 2': '1 2', '1,2': '1, 2', '1, 2': '1, 2', '1 ,2': '1, 2', '1 , 2': '1, 2', '1/2': '1/2', '1/ 2': '1/2', '1 /2': '1/2', '1 / 2': '1/2', # comment '1/**/2': '1 /**/ 2', '1 /**/2': '1 /**/ 2', '1/**/ 2': '1 /**/ 2', '1 /**/ 2': '1 /**/ 2', '1 /*a*/ /*b*/ 2': '1 /*a*/ /*b*/ 2', # , before '1,/**/2': '1, /**/ 2', '1 ,/**/2': '1, /**/ 2', '1, /**/2': '1, /**/ 2', '1 , /**/2': '1, /**/ 2', # , after '1/**/,2': '1 /**/, 2', '1/**/ ,2': '1 /**/, 2', '1/**/, 2': '1 /**/, 2', '1/**/ , 2': '1 /**/, 2', # all '1/*a*/ ,/*b*/ 2': '1 /*a*/, /*b*/ 2', '1 /*a*/, /*b*/2': '1 /*a*/, /*b*/ 2', '1 /*a*/ , /*b*/ 2': '1 /*a*/, /*b*/ 2', # list 'a b1,b2 b2,b3,b4': 'a b1, b2 b2, b3, b4', 'a b1 , b2 b2 , b3 , b4': 'a b1, b2 b2, b3, b4', 'u+1 , u+2-5': 'u+1, u+2-5', 'local( x ), url(y) format( "x" , "y" )': 'local(x), url(y) format("x", "y")', # FUNCTION 'attr( href )': 'attr(href)', # PrinceXML extende FUNC syntax with nested FUNC 'target-counter(attr(href),page)': 'target-counter(attr(href), page)', } > self.do_equal_r(tests) /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_cssvalue.py:230: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = tests = {' red ': 'red', '"x"': '"x"', '"x\\\ny"': '"xy"', '#112233': '#123', ...} att = 'cssText' def do_equal_r(self, tests, att='cssText'): # set attribute att of self.r and assert Equal for test, expected in tests.items(): > self.r.__setattr__(att, test) E AttributeError: 'TestCSSValue' object has no attribute 'r' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/basetest.py:41: AttributeError ________________________ TestCSSValue.test_cssValueType ________________________ self = def test_cssValueType(self): "CSSValue.cssValueType .cssValueTypeString" tests = [ > (['inherit', 'INhe\\rit'], 'CSS_INHERIT', cssutils.css.CSSValue), ( [ '1', '1%', '1em', '1ex', '1px', '1cm', '1mm', '1in', '1pt', '1pc', '1deg', '1rad', '1grad', '1ms', '1s', '1hz', '1khz', '1other', '"string"', "'string'", 'url(x)', 'red', 'attr(a)', 'counter(x)', 'rect(1px, 2px, 3px, 4px)', 'rgb(0, 0, 0)', '#000', '#123456', 'rgba(0, 0, 0, 0)', 'hsl(0, 0, 0)', 'hsla(0, 0, 0, 0)', ], 'CSS_PRIMITIVE_VALUE', cssutils.css.CSSPrimitiveValue, ), ( ['1px 1px', 'red blue green x'], 'CSS_VALUE_LIST', cssutils.css.CSSValueList, ), # what is a custom value? # ([], 'CSS_CUSTOM', cssutils.css.CSSValue) ] E AttributeError: module 'cssutils.css' has no attribute 'CSSValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_cssvalue.py:279: AttributeError __________________________ TestCSSValue.test_readonly __________________________ self = def test_readonly(self): "(CSSValue._readonly)" > v = cssutils.css.CSSValue(cssText='inherit') E AttributeError: module 'cssutils.css' has no attribute 'CSSValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_cssvalue.py:338: AttributeError _________________________ TestCSSValue.test_reprANDstr _________________________ self = def test_reprANDstr(self): "CSSValue.__repr__(), .__str__()" cssText = 'inherit' > s = cssutils.css.CSSValue(cssText=cssText) E AttributeError: module 'cssutils.css' has no attribute 'CSSValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_cssvalue.py:352: AttributeError _______________________ TestCSSPrimitiveValue.test_init ________________________ self = def test_init(self): "CSSPrimitiveValue.__init__()" > v = cssutils.css.CSSPrimitiveValue('1') E AttributeError: module 'cssutils.css' has no attribute 'CSSPrimitiveValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_cssvalue.py:364: AttributeError ____________________ TestCSSPrimitiveValue.test_CSS_UNKNOWN ____________________ self = def test_CSS_UNKNOWN(self): "CSSPrimitiveValue.CSS_UNKNOWN" > v = cssutils.css.CSSPrimitiveValue('expression(false)') E AttributeError: module 'cssutils.css' has no attribute 'CSSPrimitiveValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_cssvalue.py:387: AttributeError __________ TestCSSPrimitiveValue.test_CSS_NUMBER_AND_OTHER_DIMENSIONS __________ self = def test_CSS_NUMBER_AND_OTHER_DIMENSIONS(self): "CSSPrimitiveValue.CSS_NUMBER .. CSS_DIMENSION" defs = [ ('', 'CSS_NUMBER'), ('%', 'CSS_PERCENTAGE'), ('em', 'CSS_EMS'), ('ex', 'CSS_EXS'), ('px', 'CSS_PX'), ('cm', 'CSS_CM'), ('mm', 'CSS_MM'), ('in', 'CSS_IN'), ('pt', 'CSS_PT'), ('pc', 'CSS_PC'), ('deg', 'CSS_DEG'), ('rad', 'CSS_RAD'), ('grad', 'CSS_GRAD'), ('ms', 'CSS_MS'), ('s', 'CSS_S'), ('hz', 'CSS_HZ'), ('khz', 'CSS_KHZ'), ('other_dimension', 'CSS_DIMENSION'), ] for dim, name in defs: for n in (0, 1, 1.1, -1, -1.1, -0): > v = cssutils.css.CSSPrimitiveValue('%i%s' % (n, dim)) E AttributeError: module 'cssutils.css' has no attribute 'CSSPrimitiveValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_cssvalue.py:415: AttributeError _______________ TestCSSPrimitiveValue.test_CSS_STRING_AND_OTHER ________________ self = def test_CSS_STRING_AND_OTHER(self): "CSSPrimitiveValue.CSS_STRING .. CSS_RGBCOLOR" defs = [ ( ( '""', "''", '"some thing"', "' A\\ND '", # comma separated lists are STRINGS FOR NOW! 'a, b', '"a", "b"', ), 'CSS_STRING', ), (('url(a)', 'url("a b")', "url(' ')"), 'CSS_URI'), (('some', 'or_anth-er'), 'CSS_IDENT'), (('attr(a)', 'attr(b)'), 'CSS_ATTR'), (('counter(1)', 'counter(2)'), 'CSS_COUNTER'), (('rect(1,2,3,4)',), 'CSS_RECT'), (('rgb(1,2,3)', 'rgb(10%, 20%, 30%)', '#123', '#123456'), 'CSS_RGBCOLOR'), ( ( 'rgba(1,2,3,4)', 'rgba(10%, 20%, 30%, 40%)', ), 'CSS_RGBACOLOR', ), (('U+0', 'u+ffffff', 'u+000000-f', 'u+0-f, U+ee-ff'), 'CSS_UNICODE_RANGE'), ] for examples, name in defs: for x in examples: > v = cssutils.css.CSSPrimitiveValue(x) E AttributeError: module 'cssutils.css' has no attribute 'CSSPrimitiveValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_cssvalue.py:452: AttributeError _____________________ TestCSSPrimitiveValue.test_getFloat ______________________ self = def test_getFloat(self): "CSSPrimitiveValue.getFloatValue()" # NOT TESTED are float values as it seems difficult to # compare these. Maybe use decimal.Decimal? > v = cssutils.css.CSSPrimitiveValue('1px') E AttributeError: module 'cssutils.css' has no attribute 'CSSPrimitiveValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_cssvalue.py:461: AttributeError _____________________ TestCSSPrimitiveValue.test_setFloat ______________________ self = def test_setFloat(self): "CSSPrimitiveValue.setFloatValue()" > V = cssutils.css.CSSPrimitiveValue E AttributeError: module 'cssutils.css' has no attribute 'CSSPrimitiveValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_cssvalue.py:505: AttributeError _____________________ TestCSSPrimitiveValue.test_getString _____________________ self = def test_getString(self): "CSSPrimitiveValue.getStringValue()" > v = cssutils.css.CSSPrimitiveValue('1px') E AttributeError: module 'cssutils.css' has no attribute 'CSSPrimitiveValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_cssvalue.py:656: AttributeError _____________________ TestCSSPrimitiveValue.test_setString _____________________ self = def test_setString(self): "CSSPrimitiveValue.setStringValue()" # CSS_STRING > v = cssutils.css.CSSPrimitiveValue('"a"') E AttributeError: module 'cssutils.css' has no attribute 'CSSPrimitiveValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_cssvalue.py:684: AttributeError ___________________ TestCSSPrimitiveValue.test_typeRGBColor ____________________ self = def test_typeRGBColor(self): "RGBColor" > v = cssutils.css.CSSPrimitiveValue('RGB(1, 5, 10)') E AttributeError: module 'cssutils.css' has no attribute 'CSSPrimitiveValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_cssvalue.py:820: AttributeError ____________________ TestCSSPrimitiveValue.test_reprANDstr _____________________ self = def test_reprANDstr(self): "CSSPrimitiveValue.__repr__(), .__str__()" v = '111' > s = cssutils.css.CSSPrimitiveValue(v) E AttributeError: module 'cssutils.css' has no attribute 'CSSPrimitiveValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_cssvalue.py:843: AttributeError __________________________ TestCSSValueList.test_init __________________________ self = def test_init(self): "CSSValueList.__init__()" > v = cssutils.css.CSSValue(cssText='red blue') E AttributeError: module 'cssutils.css' has no attribute 'CSSValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_cssvalue.py:856: AttributeError ________________________ TestCSSValueList.test_numbers _________________________ self = def test_numbers(self): "CSSValueList.cssText" tests = { '0 0px -0px +0px': ('0 0 0 0', 4), '1 2 3 4': (None, 4), '-1 -2 -3 -4': (None, 4), '-1 2': (None, 2), '-1px red "x"': (None, 3), 'a, b c': (None, 2), '1px1 2% 3': ('1px1 2% 3', 3), 'f(+1pX, -2, 5%) 1': ('f(1px, -2, 5%) 1', 2), '0 f()0': ('0 f() 0', 3), 'f()0': ('f() 0', 2), 'f()1%': ('f() 1%', 2), 'f()1px': ('f() 1px', 2), 'f()"str"': ('f() "str"', 2), 'f()ident': ('f() ident', 2), 'f()#123': ('f() #123', 2), 'f()url()': ('f() url()', 2), 'f()f()': ('f() f()', 2), 'url(x.gif)0 0': ('url(x.gif) 0 0', 3), 'url(x.gif)no-repeat': ('url(x.gif) no-repeat', 2), } for test in tests: exp, num = tests[test] if not exp: exp = test > v = cssutils.css.CSSValue(cssText=test) E AttributeError: module 'cssutils.css' has no attribute 'CSSValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_cssvalue.py:893: AttributeError _______________________ TestCSSValueList.test_reprANDstr _______________________ self = def test_reprANDstr(self): "CSSValueList.__repr__(), .__str__()" v = '1px 2px' > s = cssutils.css.CSSValue(v) E AttributeError: module 'cssutils.css' has no attribute 'CSSValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_cssvalue.py:902: AttributeError ___________ TestProfiles.test_validateWithProfile[params3-results3] ____________ self = params = ('color', 'rgba(0,0,0,0)', None) results = (True, True, ['CSS Color Module Level 3']) @pytest.mark.parametrize(('params', 'results'), _gen_validation_inputs()) def test_validateWithProfile(self, params, results): "Profiles.validate(), Profiles.validateWithProfile()" p = cssutils.profiles.Profiles() assert p.validate(*params[:2]) == results[0] > assert p.validateWithProfile(*params) == results E AssertionError: assert (True, True, ...S Level 2.1']) == (True, True, ...ule Level 3']) E E At index 2 diff: ['CSS Level 2.1'] != ['CSS Color Module Level 3'] E Use -v to get more diff /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_profiles.py:232: AssertionError ___________ TestProfiles.test_validateWithProfile[params4-results4] ____________ self = params = ('color', 'rgba(0,0,0,0)', 'CSS Level 2.1') results = (True, False, ['CSS Color Module Level 3']) @pytest.mark.parametrize(('params', 'results'), _gen_validation_inputs()) def test_validateWithProfile(self, params, results): "Profiles.validate(), Profiles.validateWithProfile()" p = cssutils.profiles.Profiles() assert p.validate(*params[:2]) == results[0] > assert p.validateWithProfile(*params) == results E AssertionError: assert (True, True, ...S Level 2.1']) == (True, False,...ule Level 3']) E E At index 1 diff: True != False E Use -v to get more diff /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_profiles.py:232: AssertionError ___________ TestProfiles.test_validateWithProfile[params5-results5] ____________ self = params = ('color', 'rgba(0,0,0,0)', 'CSS Color Module Level 3') results = (True, True, ['CSS Color Module Level 3']) @pytest.mark.parametrize(('params', 'results'), _gen_validation_inputs()) def test_validateWithProfile(self, params, results): "Profiles.validate(), Profiles.validateWithProfile()" p = cssutils.profiles.Profiles() assert p.validate(*params[:2]) == results[0] > assert p.validateWithProfile(*params) == results E AssertionError: assert (True, False,...S Level 2.1']) == (True, True, ...ule Level 3']) E E At index 1 diff: False != True E Use -v to get more diff /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_profiles.py:232: AssertionError ___________ TestProfiles.test_validateWithProfile[params6-results6] ____________ self = params = ('color', '1px', None) results = (False, False, ['CSS Color Module Level 3', 'CSS Level 2.1']) @pytest.mark.parametrize(('params', 'results'), _gen_validation_inputs()) def test_validateWithProfile(self, params, results): "Profiles.validate(), Profiles.validateWithProfile()" p = cssutils.profiles.Profiles() assert p.validate(*params[:2]) == results[0] > assert p.validateWithProfile(*params) == results E AssertionError: assert (False, False...S Level 2.1']) == (False, False...S Level 2.1']) E E At index 2 diff: ['CSS Level 2.1'] != ['CSS Color Module Level 3', 'CSS Level 2.1'] E Use -v to get more diff /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_profiles.py:232: AssertionError ___________ TestProfiles.test_validateWithProfile[params7-results7] ____________ self = params = ('color', '1px', 'CSS Level 2.1') results = (False, False, ['CSS Color Module Level 3', 'CSS Level 2.1']) @pytest.mark.parametrize(('params', 'results'), _gen_validation_inputs()) def test_validateWithProfile(self, params, results): "Profiles.validate(), Profiles.validateWithProfile()" p = cssutils.profiles.Profiles() assert p.validate(*params[:2]) == results[0] > assert p.validateWithProfile(*params) == results E AssertionError: assert (False, False...S Level 2.1']) == (False, False...S Level 2.1']) E E At index 2 diff: ['CSS Level 2.1'] != ['CSS Color Module Level 3', 'CSS Level 2.1'] E Use -v to get more diff /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_profiles.py:232: AssertionError ___________ TestProfiles.test_validateWithProfile[params8-results8] ____________ self = params = ('color', '1px', 'CSS Color Module Level 3') results = (False, False, ['CSS Color Module Level 3', 'CSS Level 2.1']) @pytest.mark.parametrize(('params', 'results'), _gen_validation_inputs()) def test_validateWithProfile(self, params, results): "Profiles.validate(), Profiles.validateWithProfile()" p = cssutils.profiles.Profiles() assert p.validate(*params[:2]) == results[0] > assert p.validateWithProfile(*params) == results E AssertionError: assert (False, False...S Level 2.1']) == (False, False...S Level 2.1']) E E At index 2 diff: ['CSS Level 2.1'] != ['CSS Color Module Level 3', 'CSS Level 2.1'] E Use -v to get more diff /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_profiles.py:232: AssertionError ________ TestProfiles.test_validateWithProfile_fonts[params0-results0] _________ self = params = (('CSS Fonts Module Level 3 @font-face properties',), 'font-family', ('y', '"y"')) results = (True, True, ('CSS Fonts Module Level 3 @font-face properties',)) @pytest.mark.parametrize(('params', 'results'), _gen_validation_inputs()) @pytest.mark.xfail(reason="#37") def test_validateWithProfile_fonts(self, params, results): "Profiles.validateWithProfile()" # testing for valid values overwritten in a profile v, m, p = results expected = v, m, list(p) > assert cssutils.profile.validateWithProfile(*params) == expected E AssertionError: assert (False, False, []) == (True, True, ... properties']) E E At index 0 diff: False != True E Use -v to get more diff /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_profiles.py:740: AssertionError ________ TestProfiles.test_validateWithProfile_fonts[params1-results1] _________ self = params = (('CSS Fonts Module Level 3 @font-face properties',), 'font-family', ('"y", "a"', 'a, b', 'a a')) results = (True, False, ('CSS Level 2.1',)) @pytest.mark.parametrize(('params', 'results'), _gen_validation_inputs()) @pytest.mark.xfail(reason="#37") def test_validateWithProfile_fonts(self, params, results): "Profiles.validateWithProfile()" # testing for valid values overwritten in a profile v, m, p = results expected = v, m, list(p) > assert cssutils.profile.validateWithProfile(*params) == expected E AssertionError: assert (False, False, []) == (True, False,...S Level 2.1']) E E At index 0 diff: False != True E Use -v to get more diff /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_profiles.py:740: AssertionError ________ TestProfiles.test_validateWithProfile_fonts[params2-results2] _________ self = params = (('CSS Fonts Module Level 3 @font-face properties',), 'font-stretch', ('normal', 'wider', 'narrower', 'inherit')) results = (True, False, ('CSS Fonts Module Level 3',)) @pytest.mark.parametrize(('params', 'results'), _gen_validation_inputs()) @pytest.mark.xfail(reason="#37") def test_validateWithProfile_fonts(self, params, results): "Profiles.validateWithProfile()" # testing for valid values overwritten in a profile v, m, p = results expected = v, m, list(p) > assert cssutils.profile.validateWithProfile(*params) == expected E AssertionError: assert (False, False, []) == (True, False,...ule Level 3']) E E At index 0 diff: False != True E Use -v to get more diff /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_profiles.py:740: AssertionError ________ TestProfiles.test_validateWithProfile_fonts[params3-results3] _________ self = params = (('CSS Fonts Module Level 3 @font-face properties',), 'font-style', ('inherit',)) results = (True, False, ('CSS Level 2.1',)) @pytest.mark.parametrize(('params', 'results'), _gen_validation_inputs()) @pytest.mark.xfail(reason="#37") def test_validateWithProfile_fonts(self, params, results): "Profiles.validateWithProfile()" # testing for valid values overwritten in a profile v, m, p = results expected = v, m, list(p) > assert cssutils.profile.validateWithProfile(*params) == expected E AssertionError: assert (False, False, []) == (True, False,...S Level 2.1']) E E At index 0 diff: False != True E Use -v to get more diff /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_profiles.py:740: AssertionError ________ TestProfiles.test_validateWithProfile_fonts[params4-results4] _________ self = params = (('CSS Fonts Module Level 3 @font-face properties',), 'font-weight', ('bolder', 'lighter', 'inherit')) results = (True, False, ('CSS Level 2.1',)) @pytest.mark.parametrize(('params', 'results'), _gen_validation_inputs()) @pytest.mark.xfail(reason="#37") def test_validateWithProfile_fonts(self, params, results): "Profiles.validateWithProfile()" # testing for valid values overwritten in a profile v, m, p = results expected = v, m, list(p) > assert cssutils.profile.validateWithProfile(*params) == expected E AssertionError: assert (False, False, []) == (True, False,...S Level 2.1']) E E At index 0 diff: False != True E Use -v to get more diff /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_profiles.py:740: AssertionError ______________________ TestCSSVariable.test_cssValueType _______________________ self = @pytest.mark.xfail(reason="not implemented") def test_cssValueType(self): "CSSValue.cssValueType .cssValueTypeString" tests = [ > (['inherit', 'INhe\\rit'], 'CSS_INHERIT', cssutils.css.CSSValue), ( [ '1', '1%', '1em', '1ex', '1px', '1cm', '1mm', '1in', '1pt', '1pc', '1deg', '1rad', '1grad', '1ms', '1s', '1hz', '1khz', '1other', '"string"', "'string'", 'url(x)', 'red', 'attr(a)', 'counter(x)', 'rect(1px, 2px, 3px, 4px)', 'rgb(0, 0, 0)', '#000', '#123456', 'rgba(0, 0, 0, 0)', 'hsl(0, 0, 0)', 'hsla(0, 0, 0, 0)', ], 'CSS_PRIMITIVE_VALUE', cssutils.css.CSSPrimitiveValue, ), ( ['1px 1px', 'red blue green x'], 'CSS_VALUE_LIST', cssutils.css.CSSValueList, ), # what is a custom value? # ([], 'CSS_CUSTOM', cssutils.css.CSSValue) ] E AttributeError: module 'cssutils.css' has no attribute 'CSSValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_value.py:719: AttributeError _______________________ TestCSSPrimitiveValue.test_init ________________________ self = def test_init(self): "CSSPrimitiveValue.__init__()" > v = cssutils.css.CSSPrimitiveValue('1') E AttributeError: module 'cssutils.css' has no attribute 'CSSPrimitiveValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_value.py:781: AttributeError ____________________ TestCSSPrimitiveValue.test_CSS_UNKNOWN ____________________ self = def test_CSS_UNKNOWN(self): "CSSPrimitiveValue.CSS_UNKNOWN" > v = cssutils.css.CSSPrimitiveValue('expression(false)') E AttributeError: module 'cssutils.css' has no attribute 'CSSPrimitiveValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_value.py:804: AttributeError __________ TestCSSPrimitiveValue.test_CSS_NUMBER_AND_OTHER_DIMENSIONS __________ self = def test_CSS_NUMBER_AND_OTHER_DIMENSIONS(self): "CSSPrimitiveValue.CSS_NUMBER .. CSS_DIMENSION" defs = [ ('', 'CSS_NUMBER'), ('%', 'CSS_PERCENTAGE'), ('em', 'CSS_EMS'), ('ex', 'CSS_EXS'), ('px', 'CSS_PX'), ('cm', 'CSS_CM'), ('mm', 'CSS_MM'), ('in', 'CSS_IN'), ('pt', 'CSS_PT'), ('pc', 'CSS_PC'), ('deg', 'CSS_DEG'), ('rad', 'CSS_RAD'), ('grad', 'CSS_GRAD'), ('ms', 'CSS_MS'), ('s', 'CSS_S'), ('hz', 'CSS_HZ'), ('khz', 'CSS_KHZ'), ('other_dimension', 'CSS_DIMENSION'), ] for dim, name in defs: for n in (0, 1, 1.1, -1, -1.1, -0): > v = cssutils.css.CSSPrimitiveValue('%i%s' % (n, dim)) E AttributeError: module 'cssutils.css' has no attribute 'CSSPrimitiveValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_value.py:832: AttributeError _______________ TestCSSPrimitiveValue.test_CSS_STRING_AND_OTHER ________________ self = def test_CSS_STRING_AND_OTHER(self): "CSSPrimitiveValue.CSS_STRING .. CSS_RGBCOLOR" defs = [ ( ( '""', "''", '"some thing"', "' A\\ND '", # comma separated lists are STRINGS FOR NOW! 'a, b', '"a", "b"', ), 'CSS_STRING', ), (('url(a)', 'url("a b")', "url(' ')"), 'CSS_URI'), (('some', 'or_anth-er'), 'CSS_IDENT'), (('attr(a)', 'attr(b)'), 'CSS_ATTR'), (('counter(1)', 'counter(2)'), 'CSS_COUNTER'), (('rect(1,2,3,4)',), 'CSS_RECT'), (('rgb(1,2,3)', 'rgb(10%, 20%, 30%)', '#123', '#123456'), 'CSS_RGBCOLOR'), ( ( 'rgba(1,2,3,4)', 'rgba(10%, 20%, 30%, 40%)', ), 'CSS_RGBACOLOR', ), (('U+0', 'u+ffffff', 'u+000000-f', 'u+0-f, U+ee-ff'), 'CSS_UNICODE_RANGE'), ] for examples, name in defs: for x in examples: > v = cssutils.css.CSSPrimitiveValue(x) E AttributeError: module 'cssutils.css' has no attribute 'CSSPrimitiveValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_value.py:869: AttributeError _____________________ TestCSSPrimitiveValue.test_getFloat ______________________ self = def test_getFloat(self): "CSSPrimitiveValue.getFloatValue()" # NOT TESTED are float values as it seems difficult to # compare these. Maybe use decimal.Decimal? > v = cssutils.css.CSSPrimitiveValue('1px') E AttributeError: module 'cssutils.css' has no attribute 'CSSPrimitiveValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_value.py:878: AttributeError _____________________ TestCSSPrimitiveValue.test_setFloat ______________________ self = def test_setFloat(self): "CSSPrimitiveValue.setFloatValue()" > V = cssutils.css.CSSPrimitiveValue E AttributeError: module 'cssutils.css' has no attribute 'CSSPrimitiveValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_value.py:922: AttributeError _____________________ TestCSSPrimitiveValue.test_getString _____________________ self = def test_getString(self): "CSSPrimitiveValue.getStringValue()" > v = cssutils.css.CSSPrimitiveValue('1px') E AttributeError: module 'cssutils.css' has no attribute 'CSSPrimitiveValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_value.py:1072: AttributeError _____________________ TestCSSPrimitiveValue.test_setString _____________________ self = def test_setString(self): "CSSPrimitiveValue.setStringValue()" # CSS_STRING > v = cssutils.css.CSSPrimitiveValue('"a"') E AttributeError: module 'cssutils.css' has no attribute 'CSSPrimitiveValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_value.py:1100: AttributeError ___________________ TestCSSPrimitiveValue.test_typeRGBColor ____________________ self = def test_typeRGBColor(self): "RGBColor" > v = cssutils.css.CSSPrimitiveValue('RGB(1, 5, 10)') E AttributeError: module 'cssutils.css' has no attribute 'CSSPrimitiveValue' /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_value.py:1236: AttributeError _____________________________ TestX.test_priority ______________________________ self = @pytest.mark.xfail(reason="not implemented") def test_priority(self): "Property.priority" s = cssutils.parseString('a { color: red }') assert s.cssText == b'a {\n color: red\n }' assert '' == s.cssRules[0].style.getPropertyPriority('color') s = cssutils.parseString('a { color: red !important }') > assert 'a {\n color: red !important\n }' == s.cssText E AssertionError: assert 'a {\n color: red !important\n }' == b'a {\n color: red !important\n }' E + where b'a {\n color: red !important\n }' = cssutils.css.CSSStyleSheet(href=None, media=None, title=None).cssText /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/cssutils/tests/test_x.py:20: AssertionError =============================== warnings summary =============================== cssutils/tests/test_encutils.py::TestAutoEncoding::test_getEncodingInfo cssutils/tests/test_encutils.py::TestAutoEncoding::test_getEncodingInfo /home/tkloczko/rpmbuild/BUILD/cssutils-2.9.0/encutils/__init__.py:652: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead log.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =================================== XPASSES ==================================== =========================== short test summary info ============================ XFAIL cssutils/tests/test_cssvalue.py::TestCSSValue::test_init - incomplete XFAIL cssutils/tests/test_cssvalue.py::TestCSSValue::test_escapes - incomplete XFAIL cssutils/tests/test_cssvalue.py::TestCSSValue::test_cssText - incomplete XFAIL cssutils/tests/test_cssvalue.py::TestCSSValue::test_cssText2 - incomplete XFAIL cssutils/tests/test_cssvalue.py::TestCSSValue::test_cssValueType - incomplete XFAIL cssutils/tests/test_cssvalue.py::TestCSSValue::test_readonly - incomplete XFAIL cssutils/tests/test_cssvalue.py::TestCSSValue::test_reprANDstr - incomplete XFAIL cssutils/tests/test_cssvalue.py::TestCSSPrimitiveValue::test_init - incomplete XFAIL cssutils/tests/test_cssvalue.py::TestCSSPrimitiveValue::test_CSS_UNKNOWN - incomplete XFAIL cssutils/tests/test_cssvalue.py::TestCSSPrimitiveValue::test_CSS_NUMBER_AND_OTHER_DIMENSIONS - incomplete XFAIL cssutils/tests/test_cssvalue.py::TestCSSPrimitiveValue::test_CSS_STRING_AND_OTHER - incomplete XFAIL cssutils/tests/test_cssvalue.py::TestCSSPrimitiveValue::test_getFloat - incomplete XFAIL cssutils/tests/test_cssvalue.py::TestCSSPrimitiveValue::test_setFloat - incomplete XFAIL cssutils/tests/test_cssvalue.py::TestCSSPrimitiveValue::test_getString - incomplete XFAIL cssutils/tests/test_cssvalue.py::TestCSSPrimitiveValue::test_setString - incomplete XFAIL cssutils/tests/test_cssvalue.py::TestCSSPrimitiveValue::test_typeRGBColor - incomplete XFAIL cssutils/tests/test_cssvalue.py::TestCSSPrimitiveValue::test_reprANDstr - incomplete XFAIL cssutils/tests/test_cssvalue.py::TestCSSValueList::test_init - incomplete XFAIL cssutils/tests/test_cssvalue.py::TestCSSValueList::test_numbers - incomplete XFAIL cssutils/tests/test_cssvalue.py::TestCSSValueList::test_reprANDstr - incomplete XFAIL cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile[params3-results3] - #37 XFAIL cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile[params4-results4] - #37 XFAIL cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile[params5-results5] - #37 XFAIL cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile[params6-results6] - #37 XFAIL cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile[params7-results7] - #37 XFAIL cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile[params8-results8] - #37 XFAIL cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile_fonts[params0-results0] - #37 XFAIL cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile_fonts[params1-results1] - #37 XFAIL cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile_fonts[params2-results2] - #37 XFAIL cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile_fonts[params3-results3] - #37 XFAIL cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile_fonts[params4-results4] - #37 XFAIL cssutils/tests/test_value.py::TestCSSVariable::test_cssValueType - not implemented XFAIL cssutils/tests/test_value.py::TestCSSPrimitiveValue::test_init - not implemented XFAIL cssutils/tests/test_value.py::TestCSSPrimitiveValue::test_CSS_UNKNOWN - not implemented XFAIL cssutils/tests/test_value.py::TestCSSPrimitiveValue::test_CSS_NUMBER_AND_OTHER_DIMENSIONS - not implemented XFAIL cssutils/tests/test_value.py::TestCSSPrimitiveValue::test_CSS_STRING_AND_OTHER - not implemented XFAIL cssutils/tests/test_value.py::TestCSSPrimitiveValue::test_getFloat - not implemented XFAIL cssutils/tests/test_value.py::TestCSSPrimitiveValue::test_setFloat - not implemented XFAIL cssutils/tests/test_value.py::TestCSSPrimitiveValue::test_getString - not implemented XFAIL cssutils/tests/test_value.py::TestCSSPrimitiveValue::test_setString - not implemented XFAIL cssutils/tests/test_value.py::TestCSSPrimitiveValue::test_typeRGBColor - not implemented XFAIL cssutils/tests/test_x.py::TestX::test_priority - not implemented XPASS cssutils/tests/test_cssvalue.py::TestCSSValue::test_incomplete - incomplete FAILED cssutils/tests/test_domimplementation.py::TestDOMImplementation::test_createCSSStyleSheet FAILED cssutils/tests/test_domimplementation.py::TestDOMImplementation::test_createDocument FAILED cssutils/tests/test_domimplementation.py::TestDOMImplementation::test_createDocumentType FAILED cssutils/tests/test_domimplementation.py::TestDOMImplementation::test_hasFeature FAILED cssutils/tests/test_value.py::TestPropertyValue::test_cssText - Attrib... ======= 5 failed, 408 passed, 42 xfailed, 1 xpassed, 2 warnings in 6.28s ======= ```
List of installed modules in build env: ```console Package Version ----------------------------- ----------- alabaster 0.7.16 autocommand 2.2.2 Babel 2.14.0 build 1.1.1 cffi 1.16.0 charset-normalizer 3.3.2 cryptography 42.0.5 cssselect 1.2.0 distro 1.9.0 dnf 4.19.0 docutils 0.20.1 domdf_python_tools 3.8.0.post2 exceptiongroup 1.1.3 gpg 1.23.2 idna 3.6 imagesize 1.4.1 importlib_metadata 7.0.1 importlib_resources 6.3.1 iniconfig 2.0.0 installer 0.7.0 jaraco.classes 3.3.1 jaraco.context 4.3.0 jaraco.functools 4.0.0 jaraco.packaging 9.4.0 jaraco.test 5.3.0 jaraco.tidelift 1.5.1 jeepney 0.8.0 Jinja2 3.1.3 keyring 24.3.1 libdnf 0.73.0 lxml 5.1.0 MarkupSafe 2.1.3 mock 5.1.0 more-itertools 10.2.0 natsort 8.3.1 packaging 24.0 pluggy 1.4.0 ply 3.11 pycparser 2.21 Pygments 2.17.2 pyproject_hooks 1.0.0 pytest 8.1.1 python-dateutil 2.9.0.post0 requests 2.31.0 requests-toolbelt 1.0.0 rst.linker 2.4.0 SecretStorage 3.3.3 setuptools 69.1.1 setuptools-scm 8.0.4 snowballstemmer 2.2.0 Sphinx 7.2.6 sphinxcontrib-applehelp 1.0.8 sphinxcontrib-devhelp 1.0.5 sphinxcontrib-htmlhelp 2.0.5 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.7 sphinxcontrib-serializinghtml 1.1.10 tokenize_rt 5.2.0 tomli 2.0.1 typing_extensions 4.10.0 urllib3 1.26.18 wheel 0.43.0 zipp 3.17.0 ```

Please let me know if you need more details or want me to perform some diagnostics.

jaraco commented 6 months ago

I addressed these in #45.

kloczek commented 6 months ago

Tested and pytest is OK now 👍