]> git.pld-linux.org Git - packages/python-cssutils.git/blame - python-cssutils-tests.patch
- enchanced tests patch
[packages/python-cssutils.git] / python-cssutils-tests.patch
CommitLineData
21a0a319
JB
1--- cssutils-1.0.2/src/cssutils/tests/test_errorhandler.py.orig 2020-08-30 09:20:19.626140366 +0200
2+++ cssutils-1.0.2/src/cssutils/tests/test_errorhandler.py 2020-08-30 09:37:59.517065111 +0200
3@@ -74,6 +74,13 @@
4 \r
5 def test_linecol(self):\r
6 "cssutils.log line col"\r
7+ def has_libxml2():\r
8+ try:\r
9+ import libxml2\r
10+ return True\r
11+ except:\r
12+ return False\r
13+\r
14 o = cssutils.log.raiseExceptions\r
15 cssutils.log.raiseExceptions = True\r
16 \r
17@@ -84,7 +91,7 @@
9565b208
JB
18 self.assertEqual(str(e), 'CSSImportRule: Unexpected ident. [1:9: x]')\r
19 self.assertEqual(e.line, 1)\r
20 self.assertEqual(e.col, 9)\r
21- if sys.platform.startswith('java'):\r
21a0a319 22+ if sys.platform.startswith('java') or not has_libxml2():\r
9565b208
JB
23 self.assertEqual(e.msg, u'CSSImportRule: Unexpected ident. [1:9: x]')\r
24 else:\r
25 self.assertEqual(e.args, (u'CSSImportRule: Unexpected ident. [1:9: x]',))\r
21a0a319
JB
26--- cssutils-1.0.2/src/cssutils/tests/test_encutils/__init__.py.orig 2015-11-25 23:11:26.000000000 +0100
27+++ cssutils-1.0.2/src/cssutils/tests/test_encutils/__init__.py 2020-08-30 09:28:21.096865349 +0200
28@@ -203,7 +203,7 @@
29 #('utf-8', u'\u1111'.encode('utf-8'))\r
30 ]\r
31 for exp, test in tests:\r
32- self.assertEqual(exp, encutils.tryEncodings(test))\r
33+ self.assertEqual(exp, encutils.tryEncodings(test).lower())\r
34 \r
35 \r
36 def test_getEncodingInfo(self):\r
This page took 0.075476 seconds and 4 git commands to generate.