95
by Leonard Richardson
Got the test suite to pass on Python 3.2 (skipping the html5lib stuff, which doesn't seem to have Python 3 support yet.) |
1 |
#!/bin/sh
|
2 |
#
|
|
3 |
# The Python 2 source is the definitive source. This script uses 2to3-3.2 to
|
|
4 |
# create a new python3/bs4 source tree that works under Python 3.
|
|
96
by Leonard Richardson
Actually fixed the test failure. |
5 |
#
|
6 |
# See README.txt to see how to run the test suite after conversion.
|
|
101
by Leonard Richardson
More script noodling. |
7 |
echo "About to destroy and rebuild the py3k/bs4 directory." |
99
by Leonard Richardson
Tests now work in both versions, and it's possible to test both versions by running one command. |
8 |
echo "If you've got stuff in there, Ctrl-C out of this script or answer 'n'." |
101
by Leonard Richardson
More script noodling. |
9 |
mkdir -p py3k |
10 |
rm -rfI py3k/bs4 |
|
11 |
cp -r bs4/ py3k/ |
|
12 |
2to3-3.2 -w py3k |
|
96
by Leonard Richardson
Actually fixed the test failure. |
13 |
echo "" |
14 |
echo "OK, conversion is done." |
|
15 |
echo "Now running the unit tests." |
|
101
by Leonard Richardson
More script noodling. |
16 |
(cd py3k && python3 -m unittest discover -s bs4) |