diff options
author | Leonard Richardson <leonardr@segfault.org> | 2013-10-01 21:55:22 -0400 |
---|---|---|
committer | Leonard Richardson <leonardr@segfault.org> | 2013-10-01 21:55:22 -0400 |
commit | 6a06b9d998ea9502a93db14ebb65395b20c1b30f (patch) | |
tree | 0999ebae9dcc14522bdbb8bb1a3289d7d7498cbf /bs4/tests/test_soup.py | |
parent | 623d8c13b79003921fd13b59328d0c28e01eabd0 (diff) |
Fixed a bug in which short Unicode input was improperly encoded to ASCII when checking whether or not it was a file on
disk. [bug=1227016]
Diffstat (limited to 'bs4/tests/test_soup.py')
-rw-r--r-- | bs4/tests/test_soup.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bs4/tests/test_soup.py b/bs4/tests/test_soup.py index de93513..79a2bc5 100644 --- a/bs4/tests/test_soup.py +++ b/bs4/tests/test_soup.py @@ -36,6 +36,13 @@ except ImportError, e: 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 TestConstructor(SoupTest): + + def test_short_unicode_input(self): + data = u"<h1>éé</h1>" + soup = self.soup(data) + self.assertEqual(u"éé", soup.h1.string) + class TestDeprecatedConstructorArguments(SoupTest): def test_parseOnlyThese_renamed_to_parse_only(self): |