diff options
author | Leonard Richardson <leonardr@segfault.org> | 2012-08-20 14:19:00 -0400 |
---|---|---|
committer | Leonard Richardson <leonardr@segfault.org> | 2012-08-20 14:19:00 -0400 |
commit | 346acf249a043d179a940173be6de4043b6b9aae (patch) | |
tree | 636fdc5b370b7ea997ef83ae570eae3b12bcb904 /bs4/tests/test_soup.py | |
parent | 0f1e8f4a18ea9e48bc05abdb0a0eb2a75c46f714 (diff) |
Python 3.1 also needs to skip the unicode attribute name test.
Diffstat (limited to 'bs4/tests/test_soup.py')
-rw-r--r-- | bs4/tests/test_soup.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bs4/tests/test_soup.py b/bs4/tests/test_soup.py index 2ccac33..dd636d8 100644 --- a/bs4/tests/test_soup.py +++ b/bs4/tests/test_soup.py @@ -28,7 +28,8 @@ try: except ImportError, e: LXML_PRESENT = False -PRE_2_7 = (sys.version_info < (2,7)) +PYTHON_2_PRE_2_7 = (sys.version_info < (2,7)) +PYTHON_3_PRE_3_2 = (sys.version_info[0] == 3 and sys.version_info < (3,2)) class TestDeprecatedConstructorArguments(SoupTest): @@ -179,8 +180,8 @@ class TestEncodingConversion(SoupTest): self.assertEqual(soup_from_unicode.encode('utf-8'), self.utf8_data) @skipIf( - PRE_2_7, - "HTMLParser is pre-2.7; skipping test of non-ASCII characters in attribute name.") + PYTHON_2_PRE_2_7 or PYTHON_3_PRE_3_2, + "Bad HTMLParser detected; skipping test of non-ASCII characters in attribute name.") def test_attribute_name_containing_unicode_characters(self): markup = u'<div><a \N{SNOWMAN}="snowman"></a></div>' self.assertEqual(self.soup(markup).div.encode("utf8"), markup.encode("utf8")) |