a bold attempt to fix things broken by MAL's verify patch: import

'verify' iff it's used by a test module...
This commit is contained in:
Fredrik Lundh 2001-01-17 21:51:36 +00:00
parent f27cc5bc74
commit f785042433
48 changed files with 54 additions and 51 deletions

View File

@ -3,7 +3,7 @@
Roger E. Masse
"""
import al
from test_support import verify, verbose
from test_support import verbose
alattrs = ['__doc__', '__name__', 'getdefault', 'getminmax', 'getname', 'getparams',
'newconfig', 'openport', 'queryparams', 'setparams']

View File

@ -3,7 +3,7 @@
Roger E. Masse
"""
import array
from test_support import verify, verbose, TESTFN, unlink, TestFailed
from test_support import verbose, TESTFN, unlink, TestFailed
def main():

View File

@ -1,5 +1,5 @@
# Test the exit module
from test_support import verify, verbose
from test_support import verbose
import atexit
def handler1():

View File

@ -1,6 +1,6 @@
# Test audioop.
import audioop
from test_support import verify, verbose
from test_support import verbose
def gendata1():
return '\0\1\2'

View File

@ -6,7 +6,7 @@
"""
import binhex
import tempfile
from test_support import verify, verbose, TestSkipped
from test_support import verbose, TestSkipped
def test():

View File

@ -6,7 +6,7 @@
import os
import bsddb
import tempfile
from test_support import verify, verbose
from test_support import verbose
def test(openmethod, what):

View File

@ -1,4 +1,4 @@
from test_support import TestFailed, TESTFN, verify
from test_support import verify, TestFailed, TESTFN
# Simple test to ensure that optimizations in fileobject.c deliver
# the expected results. For best testing, run this under a debug-build

View File

@ -3,7 +3,7 @@
Roger E. Masse
"""
import cd
from test_support import verify, verbose
from test_support import verbose
cdattrs = ['BLOCKSIZE', 'CDROM', 'DATASIZE', 'ERROR', 'NODISC', 'PAUSED', 'PLAYING', 'READY',
'STILL', '__doc__', '__name__', 'atime', 'audio', 'catalog', 'control', 'createparser', 'error',

View File

@ -3,7 +3,7 @@
Roger E. Masse
"""
import cl
from test_support import verify, verbose
from test_support import verbose
clattrs = ['ADDED_ALGORITHM_ERROR', 'ALAW', 'ALGORITHM_ID',
'ALGORITHM_VERSION', 'AUDIO', 'AWARE_ERROR', 'AWARE_MPEG_AUDIO',

View File

@ -3,7 +3,7 @@
Roger E. Masse
"""
import cmath
from test_support import verify, verbose
from test_support import verbose
testdict = {'acos' : 1.0,
'acosh' : 1.0,

View File

@ -1,4 +1,4 @@
from test_support import verify, verbose, TestFailed
from test_support import verbose, TestFailed
if verbose:
print 'Running test on duplicate arguments'

View File

@ -2,6 +2,7 @@
from test_support import verify
import Cookie
from test_support import verify, verbose
# Currently this only tests SimpleCookie

View File

@ -4,7 +4,7 @@
"""
import dbm
from dbm import error
from test_support import verify, verbose
from test_support import verbose
filename = '/tmp/delete_me'

View File

@ -4,7 +4,7 @@
"""
import dl
from test_support import verify, verbose,TestSkipped
from test_support import verbose,TestSkipped
sharedlibs = [
('/usr/lib/libc.so', 'getpid'),

View File

@ -4,7 +4,7 @@
"""
import errno
from test_support import verify, verbose
from test_support import verbose
errors = ['E2BIG', 'EACCES', 'EADDRINUSE', 'EADDRNOTAVAIL', 'EADV',
'EAFNOSUPPORT', 'EAGAIN', 'EALREADY', 'EBADE', 'EBADF',

View File

@ -1,6 +1,5 @@
from test_support import verify, verbose
from test_support import verify, verbose, TestFailed
from UserList import UserList
from test_support import TestFailed
import string
def f(*a, **k):

View File

@ -6,7 +6,7 @@ import struct
import fcntl
import FCNTL
import os, sys
from test_support import verify, verbose, TESTFN
from test_support import verbose, TESTFN
filename = TESTFN

View File

@ -1,4 +1,4 @@
from test_support import verify, verbose
from test_support import verbose
import string, sys
# test string formatting operator (I am not sure if this is being tested
@ -184,7 +184,7 @@ def test_exc(formatstr, args, exception, excmsg):
testformat(formatstr, args)
except exception, exc:
if str(exc) == excmsg:
if verbose:
if verbose:
print "yes"
else:
if verbose: print 'no'

View File

@ -5,7 +5,7 @@
import gdbm
from gdbm import error
from test_support import verify, verbose, TestFailed
from test_support import verbose, TestFailed
filename= '/tmp/delete_me'

View File

@ -3,7 +3,7 @@
taken mostly from the documentation.
Roger E. Masse
"""
from test_support import verify, verbose, TestSkipped
from test_support import verbose, TestSkipped
import gl, GL, time
glattrs = ['RGBcolor', 'RGBcursor', 'RGBmode', 'RGBrange', 'RGBwritemask',

View File

@ -4,7 +4,7 @@
"""
import grp
from test_support import verify, verbose
from test_support import verbose
groups = grp.getgrall()
if verbose:

View File

@ -5,7 +5,7 @@
Roger E. Masse
"""
from test_support import verify, verbose, unlink
from test_support import verbose, unlink
import imageop, uu

View File

@ -4,7 +4,7 @@
Roger E. Masse
"""
from test_support import verify, verbose, unlink, findfile
from test_support import verbose, unlink, findfile
import imgfile, uu, os

View File

@ -7,7 +7,7 @@ import xml.parsers.expat
import os.path
import sys
import traceback
from test_support import verify, verbose
from test_support import verbose
if __name__ == "__main__":
base = sys.argv[0]
@ -81,7 +81,7 @@ def testLegalChildren():
dom = Document()
elem = dom.createElement('element')
text = dom.createTextNode('text')
try: dom.appendChild(text)
except HierarchyRequestErr: pass
else:
@ -99,7 +99,7 @@ def testLegalChildren():
print "dom.appendChild didn't raise HierarchyRequestErr"
elem.appendChild(text)
dom.unlink()
dom.unlink()
def testNonZero():
dom = parse(tstfile)
@ -395,7 +395,7 @@ def _testCloneElementCopiesAttributes(e1, e2, test):
, "clone of attribute node has proper attribute values")
confirm(a2.ownerElement is e2,
"clone of attribute node correctly owned")
def testCloneDocumentShallow(): pass

View File

@ -1,4 +1,4 @@
from test_support import verify, verbose
from test_support import verbose
import sys
import new

View File

@ -1,4 +1,4 @@
from test_support import verify, verbose, TestFailed, TestSkipped
from test_support import verbose, TestFailed, TestSkipped
import nis
print 'nis.maps()'

View File

@ -1,7 +1,7 @@
# Test to see if openpty works. (But don't worry if it isn't available.)
import os
from test_support import verify, verbose, TestFailed, TestSkipped
from test_support import verbose, TestFailed, TestSkipped
try:
if verbose:

View File

@ -3,7 +3,7 @@ import parser
import pprint
import sys
from test_support import verify, TestFailed
from test_support import TestFailed
#
# First, we test that we can generate trees from valid source fragments,

View File

@ -1,5 +1,5 @@
import pty, os, sys, string
from test_support import verify, verbose, TestFailed, TestSkipped
from test_support import verbose, TestFailed, TestSkipped
TEST_STRING_1 = "I wish to buy a fish license."
TEST_STRING_2 = "For my pet fish, Eric."

View File

@ -1,4 +1,4 @@
from test_support import verify, verbose
from test_support import verbose
import pwd
import string

View File

@ -1,4 +1,4 @@
from test_support import verify, verbose
from test_support import verbose
import warnings
warnings.filterwarnings("ignore", "the regex module is deprecated",
DeprecationWarning, __name__)

View File

@ -1,4 +1,4 @@
from test_support import verify, verbose
from test_support import verbose
import rfc822, sys
try:
from cStringIO import StringIO

View File

@ -2,7 +2,7 @@
import rgbimg, os, uu
from test_support import verify, verbose, unlink, findfile
from test_support import verbose, unlink, findfile
class error(Exception):
pass

View File

@ -1,5 +1,5 @@
# Testing select module
from test_support import verify, verbose
from test_support import verbose
import select
import os

View File

@ -1,5 +1,5 @@
# Test the signal module
from test_support import verify, verbose, TestSkipped
from test_support import verbose, TestSkipped
import signal
import os
import sys

View File

@ -8,7 +8,7 @@
# sktobj.shutdown()
from test_support import verify, verbose, TestFailed
from test_support import verbose, TestFailed
import socket
import os
import time

View File

@ -6,7 +6,7 @@
import sys
sys.path=['.']+sys.path
from test_support import verify, verbose, TestFailed
from test_support import verbose, TestFailed
import sre
import sys, os, string, traceback

View File

@ -3,7 +3,7 @@
# Sanity checker for time.strftime
import time, calendar, sys, string, os, re
from test_support import verify, verbose
from test_support import verbose
def main():
global verbose

View File

@ -1,4 +1,4 @@
from test_support import verify, verbose, TestSkipped
from test_support import verbose, TestSkipped
import string_tests
import string, sys

View File

@ -1,4 +1,4 @@
from test_support import verify, verbose
from test_support import verbose
import strop, sys
def test(name, input, output, *args):

View File

@ -1,4 +1,4 @@
from test_support import verify, verbose, findfile, TestFailed
from test_support import verbose, findfile, TestFailed
import sunaudiodev
import os

View File

@ -2,7 +2,7 @@
# Create a bunch of threads, let each do some work, wait until all are done
from test_support import verify, verbose
from test_support import verbose
import random
import thread
import time

View File

@ -1,4 +1,4 @@
from test_support import verify, verbose
from test_support import verbose
import timing
r = range(100000)

View File

@ -1,4 +1,4 @@
from test_support import verify, verbose, findfile
from test_support import verbose, findfile
import tokenize, os, sys
if verbose:

View File

@ -3,8 +3,9 @@
from UserList import UserList
from test_support import TestFailed
# Use check instead of verify(so -O doesn't render the)
# Use check instead of assert so -O doesn't render the
# test useless.
# XXX: could use the verify function in test_support instead
def check(predicate, msg):
if not predicate:
raise TestFailed(msg + " failed")

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
import sys, string
from test_support import verify, verbose
from test_support import verbose
import string_tests
# UserString is a wrapper around the native builtin string type.
# UserString instances should behave similar to builtin string objects.

View File

@ -4,6 +4,8 @@
from _winreg import *
import os, sys
from test_support import verify
test_key_name = "SOFTWARE\\Python Registry Test Key - Delete Me"
test_data = [

View File

@ -2,7 +2,7 @@
Sjoerd Mullender
'''
from test_support import verify, verbose
from test_support import verbose
testdoc = """\
<?xml version="1.0" encoding="UTF-8" standalone='yes' ?>