#!@BASH@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
+# $Id$
if [ $# -lt 1 ] ; then
- echo "$0: at least one argument needed" 1>&2
+ vecho "${0##*/}: at least one argument needed" 1>&2
exit 1
fi
for x in "$@" ; do
if [ -s "${x}" ] ; then
install -m0644 "${x}" "${dir}"
- gzip -f -9 "${dir}/${x##*/}"
+ ecompress "${dir}/${x##*/}"
elif [ ! -e "${x}" ] ; then
echo "dodoc: ${x} does not exist" 1>&2
((++ret))
#!@BASH@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id: /var/cvsroot/gentoo-src/portage/bin/doinfo,v 1.7 2004/10/04 13:56:50 vapier Exp $
-if [ ${#} -lt 1 ] ; then
- echo "doinfo: at least one argument needed"
+if [[ -z $1 ]] ; then
+ vecho "${0##*/}: at least one argument needed"
exit 1
fi
-if [ ! -d "${ED}/usr/share/info" ] ; then
- install -d "${ED}/usr/share/info"
+
+if [[ ! -d ${ED}usr/share/info ]] ; then
+ install -d "${ED}usr/share/info" || exit 1
fi
-for x in "$@" ; do
- if [ -e "${x}" ] ; then
- install -m 0644 "${x}" "${ED}/usr/share/info"
- gzip -f -9 "${ED}/usr/share/info/${x##*/}"
- else
- echo "doinfo: ${x} does not exist"
- fi
-done
+exec install -m0644 "$@" "${ED}usr/share/info"
--- /dev/null
+#!/bin/bash
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id: prepman 5507 2007-01-10 04:22:27Z zmedico $
+
+if [[ -z $1 ]] ; then
+ echo "${0##*/}: at least one argument needed" 1>&2
+ exit 1
+fi
+
+source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+
+# setup compression stuff
+PORTAGE_COMPRESS=${PORTAGE_COMPRESS:-bzip2}
+if [[ -z ${PORTAGE_COMPRESS_FLAGS} ]] ; then
+ case ${PORTAGE_COMPRESS} in
+ bzip2|gzip) PORTAGE_COMPRESS_FLAGS="-9";;
+ esac
+fi
+
+case $1 in
+ --suffix)
+ set -e
+ tmpdir="${T}"/.ecompress$$.${RANDOM}
+ mkdir "${tmpdir}"
+ cd "${tmpdir}"
+ # we have to fill the file enough so that there is something
+ # to compress as some programs will refuse to do compression
+ # if it cannot actually compress the file
+ echo {0..1000} > compressme
+ ${PORTAGE_COMPRESS} ${PORTAGE_COMPRESS_FLAGS} compressme
+ suffix=$(ls compressme*)
+ suffix=${suffix#compressme}
+ cd /
+ rm -rf "${tmpdir}"
+ echo "${suffix}"
+ ;;
+ --bin)
+ echo "${PORTAGE_COMPRESS} ${PORTAGE_COMPRESS_FLAGS}"
+ ;;
+ *)
+ exec "${PORTAGE_COMPRESS}" ${PORTAGE_COMPRESS_FLAGS} "$@"
+ ;;
+esac
--- /dev/null
+#!/bin/bash
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id: prepalldocs 3483 2006-06-10 21:40:40Z genone $
+
+if [[ -z $1 ]] ; then
+ echo "${0##*/}: at least one argument needed" 1>&2
+ exit 1
+fi
+
+# figure out the new suffix
+suffix=$(ecompress --suffix)
+[[ -z ${suffix} ]] && exit 0
+
+source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+
+ret=0
+
+for dir in "$@" ; do
+ dir="${D}${dir}"
+ if [[ ! -d ${dir} ]] ; then
+ vecho "${0##*/}: ${dir#${D}} does not exist!"
+ continue
+ else
+ vecho "${0##*/}: $(ecompress --bin) ${dir#${D}}"
+ fi
+
+ find "${dir}" -type f -print0 | xargs -0 ecompress
+ ((ret+=$?))
+ find -L "${dir}" -type l | \
+ while read brokenlink ; do
+ olddest=$(readlink "${brokenlink}")
+ newdest="${olddest}${suffix}"
+ if [[ -e ${newdest} ]] ; then
+ ln -snf "${newdest}" "${brokenlink}"
+ ((ret+=$?))
+ else
+ vecho "ecompressdir: unknown broken symlink: ${brokenlink}"
+ ((++ret))
+ fi
+ done
+done
+
+exit ${ret}
print ">>> Timestamps on the server and in the local repository are the same."
print ">>> Cancelling all further sync action. You are already up to date."
print ">>>"
+ print ">>> In order to force sync, remove '%s'." % tmpservertimestampfile
+ print ">>>"
print
sys.exit(0)
elif (servertimestamp != 0) and (servertimestamp < mytimestamp):
print ">>>"
print ">>> SERVER OUT OF DATE: %s" % dosyncuri
print ">>>"
+ print ">>> In order to force sync, remove '%s'." % tmpservertimestampfile
+ print ">>>"
print
elif (servertimestamp == 0) or (servertimestamp > mytimestamp):
# actual sync
fi
# Portage regenerates this on the installed system.
- if [[ -f ${ED}/usr/share/info/dir.gz ]] ; then
- rm -f "${ED}"/usr/share/info/dir.gz
- fi
+ rm -f "${ED}"/usr/share/info/dir{,.gz,.bz2}
if hasq multilib-strict ${FEATURES} && \
[[ -x ${EPREFIX}/usr/bin/file && -x ${EPREFIX}/usr/bin/find ]] && \
#!@BASH@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id: /var/cvsroot/gentoo-src/portage/bin/prepalldocs,v 1.6 2004/10/04 13:56:50 vapier Exp $
-z="`find "${ED}"/usr/share/doc \( -type f -or -type l \) -not -name "*.gz" -not -name "*.js" 2>/dev/null`"
+if [[ -n $1 ]] ; then
+ vecho "${0##*/}: invalid usage; takes no arguments" 1>&2
+fi
-for y in ${z} ; do
- if [ -L "${y}" ] ; then
- # Symlink ...
- mylink="${y}"
- linkto="`readlink "${y}"`"
+cd "${ED}"
+[[ -d usr/share/doc ]] || exit 0
- if [ "${linkto##*.}" != "gz" ] ; then
- linkto="${linkto}.gz"
- fi
- if [ "${mylink##*.}" != "gz" ] ; then
- mylink="${mylink}.gz"
- fi
+# we dont want to compress the html subdir
+if [[ -d ${ED}usr/share/doc/${PF}/html ]] ; then
+ mv "${ED}"usr/share/doc/${PF}/html "${T}"/ecompressdir-html-backup || exit 1
+fi
- echo "fixing doc symlink: ${mylink##*/}"
- ln -snf "${linkto}" "${mylink}"
- if [ "${y}" != "${mylink}" ] ; then
- echo "removing old symlink: ${y##*/}"
- rm -f "${y}"
- fi
- else
- if [ "${y##*.}" != "gz" ] ; then
- echo "gzipping doc: ${y##*/}"
- gzip -f -9 "${y}"
- fi
- fi
-done
+ecompressdir /usr/share/doc
+ret=$?
+
+if [[ -d ${T}/ecompressdir-html-backup ]] ; then
+ mv "${T}"/html "${ED}"/usr/share/doc/${PF}/html
+fi
+
+exit ${ret}
# Distributed under the terms of the GNU General Public License v2
# $Id: /var/cvsroot/gentoo-src/portage/bin/prepallinfo,v 1.6 2004/10/04 13:56:50 vapier Exp $
-[[ ! -d ${ED}/usr/share/info ]] && exit 0
+[[ ! -d ${ED}usr/share/info ]] && exit 0
-echo "info:"
exec prepinfo
#!@BASH@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id: /var/cvsroot/gentoo-src/portage/bin/prepallman,v 1.10 2004/10/04 13:56:50 vapier Exp $
ret=0
-echo "man:"
-for x in "${ED}"/opt/*/man "${ED}"/usr/share/man "${ED}"/usr/local/man "${ED}"/usr/X11R6/man ; do
- if [[ -d ${x} ]] ; then
- x=${x#${ED}}
- x=${x%/man}
- prepman "${x}"
- ((ret+=$?))
- fi
-done
+find "${ED}" -type d -name man > "${T}"/prepallman.filelist
+while read mandir ; do
+ mandir=${mandir#${ED}}
+ prepman "${mandir%/man}"
+ ((ret+=$?))
+done < "${T}"/prepallman.filelist
exit ${ret}
#!@BASH@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id: /var/cvsroot/gentoo-src/portage/bin/prepinfo,v 1.6.2.1 2005/05/29 12:40:08 jstubbs Exp $
-if [ -z "$1" ] ; then
- z="${ED}/usr/share/info"
+if [[ -z $1 ]] ; then
+ infodir="${EPREFIX}/usr/share/info"
else
- if [ -d "${ED}$1/share/info" ] ; then
- z="${ED}$1/share/info"
+ if [[ -d ${ED}$1/share/info ]] ; then
+ infodir="${EPREFIX}$1/share/info"
else
- z="${ED}$1/info"
+ infodir="${EPREFIX}$1/info"
fi
fi
-[ ! -d "${z}" ] && exit 0
-
-rm -f "${z}"/{dir,dir.info,dir.info.gz}
-
-for x in `find "${z}"/ -mindepth 1 -maxdepth 1 \( -type f -or -type l \) 2>/dev/null` ; do
- if [ -L "${x}" ] ; then
- # Symlink ...
- mylink="${x}"
- linkto="`readlink "${x}"`"
-
- if [ "${linkto##*.}" != "gz" ] ; then
- linkto="${linkto}.gz"
- fi
- if [ "${mylink##*.}" != "gz" ] ; then
- mylink="${mylink}.gz"
- fi
-
- echo "fixing GNU info symlink: ${mylink##*/}"
- ln -snf "${linkto}" "${mylink}"
- if [ "${x}" != "${mylink}" ] ; then
- echo "removing old symlink: ${x##*/}"
- rm -f "${x}"
- fi
+if [[ ! -d ${ED}${infodir} ]] ; then
+ if [[ -n $1 ]] ; then
+ vecho "${0##*/}: '${infodir}' does not exist!"
+ exit 1
else
- if [ "${x##*.}" != "gz" ] ; then
- echo "gzipping GNU info page: ${x##*/}"
- gzip -f -9 "${x}"
- fi
+ exit 0
fi
-done
+fi
+
+rm -f "${ED}${infodir}"/dir{,.info}{,.gz,.bz2}
+
+exec ecompressdir "${infodir}"
#!@BASH@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id: /var/cvsroot/gentoo-src/portage/bin/prepman,v 1.10.2.3 2005/05/29 12:40:08 jstubbs Exp $
if [[ -z $1 ]] ; then
- z="${ED}/usr/share/man"
+ mandir="${ED}usr/share/man"
else
- z="${ED}$1/man"
+ mandir="${ED}$1/man"
fi
-if [[ ! -d ${z} ]] ; then
- eqawarn "QA Notice: prepman called with non-existent dir '${z#${ED}}'"
+if [[ ! -d ${mandir} ]] ; then
+ eqawarn "QA Notice: prepman called with non-existent dir '${mandir#${ED}}'"
exit 0
fi
-for x in $(find "${z}"/ -type d 2>/dev/null) ; do
- for y in $(find "${x}"/ -mindepth 1 -maxdepth 1 \( -type f -or -type l \) ! -name '.keep_*' 2>/dev/null) ; do
- if [[ -L ${y} ]] ; then
- # Symlink ...
- mylink=${y}
- linkto=$(readlink "${y}")
-
- # Do NOT change links to directories
- if [[ -d ${z}/${linkto} ]] ; then
- continue
- fi
+shopt -s nullglob
- if [[ ${linkto##*.} != "gz" ]] && [[ ${linkto##*.} != "bz2" ]] ; then
- linkto="${linkto}.gz"
- fi
- if [[ ${mylink##*.} != "gz" ]] && [[ ${mylink##*.} != "bz2" ]] ; then
- mylink="${mylink}.gz"
- fi
+ret=0
- echo "fixing man page symlink: ${mylink##*/}"
- ln -snf "${linkto}" "${mylink}"
- if [[ ${y} != "${mylink}" ]] ; then
- echo "removing old symlink: ${y##*/}"
- rm -f "${y}"
- fi
- else
- if [[ ${y##*.} != "gz" ]] && [[ ${y##*.} != "bz2" ]] && [[ ! -d ${y} ]] ; then
- echo "gzipping man page: ${y##*/}"
- gzip -f -9 "${y}"
- fi
- fi
- done
+# compress and fixup links in each dir
+for subdir in "${mandir}"/man* "${mandir}"/*/man* ; do
+ [[ -d ${subdir} ]] || continue # ignore files named 'man*'
+ ecompressdir "/${subdir#${ED}}"
+ ((ret+=$?))
done
+
+exit ${ret}
.B EPAUSE_IGNORE
Defines whether or not to ignore short pauses that occur when displaying
important informational messages. This variable is unset by default.
+If it is set to any value pauses are ignored.
.TP
\fBFEATURES\fR = \fI"sandbox ccache"\fR
Defines actions portage takes by default. These options should
myflags = set(myflags)
myflags.update(self.useforce)
+ # FEATURES=test should imply USE=test
+ if "test" in self.configlist[-1].get("FEATURES","").split():
+ myflags.add("test")
+
usesplit = [ x for x in myflags if \
x not in self.usemask]
+
usesplit.sort()
# Use the calculated USE flags to regenerate the USE_EXPAND flags so
def isjustname(mypkg):
"""
- Checks to see if the depstring is only the package name
+ Checks to see if the depstring is only the package name (no version parts)
Example usage:
>>> isjustname('media-libs/test-3.0')
def __init__(self,value):
self.value = value[:]
def __str__(self):
- if isinstance(self.value, str):
+ if isinstance(self.value, basestring):
return self.value
else:
return repr(self.value)
return new_list.keys()
def grabdict(myfilename, juststrings=0, empty=0, recursive=0, incremental=1):
- """This function grabs the lines in a file, normalizes whitespace and returns lines in a dictionary"""
+ """
+ This function grabs the lines in a file, normalizes whitespace and returns lines in a dictionary
+
+ @param myfilename: file to process
+ @type myfilename: string (path)
+ @param juststrings: only return strings
+ @type juststrings: Boolean (integer)
+ @param empty: Ignore certain lines
+ @type empty: Boolean (integer)
+ @param recursive: Recursively grab ( support for /etc/portage/package.keywords/* and friends )
+ @type recursive: Boolean (integer)
+ @param incremental: Append to the return list, don't overwrite
+ @type incremental: Boolean (integer)
+ @rtype: Dictionary
+ @returns:
+ 1. Returns the lines in a file in a dictionary, for example:
+ 'sys-apps/portage x86 amd64 ppc'
+ would return
+ { "sys-apps/portage" : [ 'x86', 'amd64', 'ppc' ]
+ the line syntax is key : [list of values]
+ """
newdict={}
for x in grablines(myfilename, recursive):
#the split/join thing removes leading and trailing whitespace, and converts any whitespace in the line
mylines=[]
if recursive and os.path.isdir(myfilename):
if myfilename in ["RCS", "CVS", "SCCS"]:
- continue
+ return mylines
dirlist = os.listdir(myfilename)
dirlist.sort()
for f in dirlist:
--- /dev/null
+# test_dep_getcpv.py -- Portage Unit Testing Functionality
+# Copyright 2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id: test_atoms.py 5525 2007-01-10 13:35:03Z antarus $
+
+from unittest import TestCase
+from portage_dep import dep_getcpv
+
+class DepGetCPV(TestCase):
+ """ A simple testcase for isvalidatom
+ """
+
+ def testDepGetCPV(self):
+
+ prefix_ops = ["<", ">", "=", "~", "!", "<=",
+ ">=", "!=", "!<", "!>", "!~",""]
+ postfix_ops = [ "*", "" ]
+
+ cpvs = ["sys-apps/portage"]
+
+ for cpv in cpvs:
+ for prefix in prefix_ops:
+ for postfix in postfix_ops:
+ self.assertEqual( dep_getcpv(
+ prefix + cpv + postfix ), cpv )
--- /dev/null
+# test_dep_getslot.py -- Portage Unit Testing Functionality
+# Copyright 2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id: test_atoms.py 5525 2007-01-10 13:35:03Z antarus $
+
+from unittest import TestCase
+from portage_dep import dep_getslot
+
+class DepGetSlot(TestCase):
+ """ A simple testcase for isvalidatom
+ """
+
+ def testDepGetSlot(self):
+
+ slot_char = ":"
+ slots = ( "a", "1.2", "1", "IloveVapier", None )
+ cpvs = ["sys-apps/portage"]
+
+ for cpv in cpvs:
+ for slot in slots:
+ if slot:
+ self.assertEqual( dep_getslot(
+ cpv + slot_char + slot ), slot )
+ else:
+ self.assertEqual( dep_getslot( cpv ), slot )
+
+ self.assertEqual( dep_getslot( "sys-apps/portage:"), "" )
--- /dev/null
+# test_match_from_list.py -- Portage Unit Testing Functionality
+# Copyright 2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id: test_atoms.py 5525 2007-01-10 13:35:03Z antarus $
+
+from unittest import TestCase
+from portage_dep import get_operator
+
+class GetOperator(TestCase):
+
+ def testGetOperator(self):
+
+ # get_operator does not validate operators
+ tests = [ ( "~", "~" ), ( "=", "=" ), ( ">", ">" ),
+ ( ">=", ">=" ), ( "<=", "<=" ) , ( "", None ),
+ ( ">~", ">" ), ("~<", "~"), ( "=~", "=" ),
+ ( "=>", "=" ), ("=<", "=") ]
+
+ testCP = "sys-apps/portage"
+
+ for test in tests:
+ result = get_operator( test[0] + testCP )
+ self.assertEqual( result, test[1] )
+
+ result = get_operator( "=sys-apps/portage*" )
+ self.assertEqual( result , "=*" )
--- /dev/null
+# test_isjustname.py -- Portage Unit Testing Functionality
+# Copyright 2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id: test_atoms.py 5525 2007-01-10 13:35:03Z antarus $
+
+from unittest import TestCase
+from portage_dep import isjustname
+
+class IsJustName(TestCase):
+
+ def testIsJustName(self):
+
+ cats = ( "", "sys-apps/", "foo/", "virtual/" )
+ pkgs = ( "portage", "paludis", "pkgcore", "notARealPkg" )
+ vers = ( "", "-2.0-r3", "-1.0_pre2", "-3.1b" )
+
+ for pkg in pkgs:
+ for cat in cats:
+ for ver in vers:
+ if len(ver):
+ self.assertFalse( isjustname( cat + pkg + ver ),
+ msg="isjustname(%s) is True!" % (cat + pkg + ver) )
+ else:
+ self.assertTrue( isjustname( cat + pkg + ver ),
+ msg="isjustname(%s) is False!" % (cat + pkg + ver) )
--- /dev/null
+# test_isvalidatom.py -- Portage Unit Testing Functionality
+# Copyright 2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id: test_atoms.py 5525 2007-01-10 13:35:03Z antarus $
+
+from unittest import TestCase
+from portage_dep import isvalidatom
+
+class IsValidAtom(TestCase):
+ """ A simple testcase for isvalidatom
+ """
+
+ def testIsValidAtom(self):
+
+ tests = [ ( "sys-apps/portage", True ),
+ ( "=sys-apps/portage-2.1", True ),
+ ( "=sys-apps/portage-2.1*", True ),
+ ( ">=sys-apps/portage-2.1", True ),
+ ( "<=sys-apps/portage-2.1", True ),
+ ( ">sys-apps/portage-2.1", True ),
+ ( "<sys-apps/portage-2.1", True ),
+ ( "~sys-apps/portage-2.1", True ),
+ ( ">~cate-gory/foo-1.0", False ),
+ ( ">~category/foo-1.0", False ),
+ ( "<~category/foo-1.0", False ),
+ ( "###cat/foo-1.0", False ),
+ ( "~sys-apps/portage", False ),
+ ( "portage", False ) ]
+
+ for test in tests:
+ if test[1]:
+ atom_type = "valid"
+ else:
+ atom_type = "invalid"
+
+ self.assertEqual( bool(isvalidatom( test[0] )), test[1] )
# ("=sys-fs/udev_cvs*","sys-fs/udev_cvs_pre4" ) ]
for test in tests:
- self.failIf( len(match_from_list( test[0], [test[1]] )) != 1,
- msg="%s should match %s!" % (test[0], test[1]) )
+ self.assertEqual( len(match_from_list( test[0], [test[1]] )), 1 )
def testEqualGlobFail(self):
tests = [ ("=sys-apps/portage-2*", "sys-apps/portage-2.1" ),
("=sys-apps/portage-2.1*", "sys-apps/portage-2.1.2" ) ]
for test in tests:
try:
- self.failIf( len( match_from_list( test[0], [test[1]] ) ) != 1,
- msg="%s shouldn't match %s!" % (test[0], test[1]) )
+ self.assertEqual( len( match_from_list( test[0], [test[1]] ) ), 1 )
except TypeError: # failure is ok here
pass
--- /dev/null
+# test_grabDict.py -- Portage Unit Testing Functionality
+# Copyright 2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id: test_vercmp.py 5213 2006-12-08 00:12:41Z antarus $
+
+from unittest import TestCase, TestLoader
+from portage_util import grabdict
+
+class GrabDictTestCase(TestCase):
+
+ def testGrabDictPass(self):
+ pass
from portage_util import normalize_path
path = "///foo/bar/baz"
good = "/foo/bar/baz"
- self.failUnless(normalize_path(path) == good, msg="NormalizePath(%s) failed to produce %s" % (path, good))
-
+ self.assertEqual(normalize_path(path), good)
tests.append(( {'KEYWORDS':['alpha','x86']},{'KEYWORDS':['-*']},True,{} ))
tests.append(( {'KEYWORDS':['alpha','x86']},{'KEYWORDS':['-x86']},True,{'KEYWORDS':['alpha']} ))
for test in tests:
- self.failUnless(stack_dictlist([test[0],test[1]],incremental=test[2]) == test[3],
- msg="%s and %s combined, was expecting: %s and got: %s" % (test[0],test[1],test[3],
- stack_dictlist([test[0],test[1]],incremental=test[2])) )
+ self.assertEqual(
+ stack_dictlist([test[0],test[1]],incremental=test[2]), test[3] )
for test in tests:
result = stack_dicts( test[0], test[2], test[3], test[4] )
- self.failIf( result != test[1], msg="Expected %s = %s" \
- % ( result, test[1] ) )
+ self.assertEqual( result, test[1] )
def testStackDictsFail(self):
False, [], False ) ]
for test in tests:
result = stack_dicts( test[0], test[2], test[3], test[4] )
- self.failIf( result == test[1], msg="Expected %s != %s, got \
- %s == %s!" % (result, test[1], result, test[1]) )
+ self.assertNotEqual( result , test[1] )
for test in tests:
result = stack_lists( test[0], test[2] )
- self.failIf( result != test[1],
- msg="Got %s != %s from stack_lists( %s, %s )" \
- % ( result, test[1], test[0], test[2] ) )
+ self.assertEqual( result , test[1] )