diff options
author | Michael Shields <mshields@google.com> | 2009-03-26 16:50:46 +0000 |
---|---|---|
committer | Michael Shields <mshields@google.com> | 2009-03-26 16:50:46 +0000 |
commit | 83c3f9f927acb519dd93073467af55799849495d (patch) | |
tree | dd938dedb01fe203921db2f0e958748e3f999e9b /test-2to3.sh | |
parent | 775d4f4874b2f3416b3c1d1a5db9269cfe76274b (diff) | |
download | ipaddr-py-83c3f9f927acb519dd93073467af55799849495d.tar.gz |
Expand rich comparison operations and their tests, with a goal of
supporting 2to3. Add a new method .networks_key(). Add a new script
to run through 2to3 and make sure tests pass under Python 3 with the
converted version.
Contributed by Philipp Hagemeister. http://codereview.appspot.com/27109
git-svn-id: https://ipaddr-py.googlecode.com/svn/trunk@66 09200d28-7f98-11dd-ad27-0f66e57d2035
Diffstat (limited to 'test-2to3.sh')
-rw-r--r-- | test-2to3.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test-2to3.sh b/test-2to3.sh new file mode 100644 index 0000000..408d665 --- /dev/null +++ b/test-2to3.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# Converts the python2 ipaddr files to python3 and runs the unit tests +# with both python versions. + +mkdir -p 2to3output && \ +cp -f *.py 2to3output && \ +( cd 2to3output && 2to3 . | patch -p0 ) && \ +py3version=$(python3 --version 2>&1) && \ +echo -e "\nTesting with ${py3version}" && \ +python3 2to3output/ipaddr_test.py && \ +rm -r 2to3output && \ +pyversion=$(python --version 2>&1) && \ +echo -e "\nTesting with ${pyversion}" && \ +./ipaddr_test.py |