Enable -Wd for tests, so DeprecationWarning works
authorZac Medico <zmedico@gentoo.org>
Thu, 25 Aug 2011 22:35:53 +0000 (15:35 -0700)
committerZac Medico <zmedico@gentoo.org>
Thu, 25 Aug 2011 22:35:53 +0000 (15:35 -0700)
DeprecationWarning is suppressed by default since Python 2.7, so it's
a good idea to explicitly enable it for tests.

pym/portage/tests/runTests
runtests.sh

index 6b3311d2880ddb2441cf2266c65eca8d0b870e03..146f7d4acac8cc81c02d9176a1a766dffe484d35 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python -Wd
 # runTests.py -- Portage Unit Test Functionality
 # Copyright 2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
index 11aec60f52eaf6f692f5764fc7cc77ed9b907b64..981fa1ec2ebad9b507ad2141d3b3a74b47133fb6 100755 (executable)
@@ -28,7 +28,7 @@ exit_status="0"
 for version in ${PYTHON_VERSIONS}; do
        if [[ -x /usr/bin/python${version} ]]; then
                echo -e "${GOOD}Testing with Python ${version}...${NORMAL}"
-               if ! /usr/bin/python${version} pym/portage/tests/runTests "$@" ; then
+               if ! /usr/bin/python${version} -Wd pym/portage/tests/runTests "$@" ; then
                        echo -e "${BAD}Testing with Python ${version} failed${NORMAL}"
                        exit_status="1"
                fi