summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bs4/tests/test_lxml.py2
-rwxr-xr-xconvert-python3.213
2 files changed, 11 insertions, 4 deletions
diff --git a/bs4/tests/test_lxml.py b/bs4/tests/test_lxml.py
index 2f64d31..0eafab0 100644
--- a/bs4/tests/test_lxml.py
+++ b/bs4/tests/test_lxml.py
@@ -250,7 +250,7 @@ class TestLXMLBuilder(SoupTest):
b'\xea\x82\xcc\x83t\x83@\x83C\x83\x8b\x82\xc5\x82\xb7\x81B'
b'</pre></body></html>')
unicode_html = shift_jis_html.decode("shift-jis")
- soup = self.soup(shift_jis_html)
+ soup = self.soup(unicode_html)
# Make sure the parse tree is correctly encoded to various
# encodings.
diff --git a/convert-python3.2 b/convert-python3.2
index a083124..7e86f35 100755
--- a/convert-python3.2
+++ b/convert-python3.2
@@ -2,7 +2,14 @@
#
# The Python 2 source is the definitive source. This script uses 2to3-3.2 to
# create a new python3/bs4 source tree that works under Python 3.
-rm -rf python3.2
-mkdir python3.2
+#
+# See README.txt to see how to run the test suite after conversion.
+echo "About to destroy the python3.2/bs4 directory."
+echo "Don't let this script run any further if your own stuff is in there."
+rm -rfI python3.2/bs4
cp -r bs4 python3.2
-2to3-3.2 -w python3.2 \ No newline at end of file
+2to3-3.2 -w python3.2
+echo ""
+echo "OK, conversion is done."
+echo "Now running the unit tests."
+(cd python3.2/bs4 && python3.2 -m unittest discover) \ No newline at end of file