Sync with upstream
[svnrdump.git] / svntest / __init__.py
blob55813a21dbd03afb7995db796a371060a3678b4f
3 # Licensed to the Apache Software Foundation (ASF) under one
4 # or more contributor license agreements. See the NOTICE file
5 # distributed with this work for additional information
6 # regarding copyright ownership. The ASF licenses this file
7 # to you under the Apache License, Version 2.0 (the
8 # "License"); you may not use this file except in compliance
9 # with the License. You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing,
14 # software distributed under the License is distributed on an
15 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 # KIND, either express or implied. See the License for the
17 # specific language governing permissions and limitations
18 # under the License.
21 # any bozos that do "from svntest import *" should die. export nothing
22 # to the dumbasses.
23 __all__ = [ ]
25 import sys
26 if sys.hexversion < 0x2040000:
27 sys.stderr.write('[SKIPPED] at least Python 2.4 is required\n')
29 # note: exiting is a bit harsh for a library module, but we really do
30 # require Python 2.4. this package isn't going to work otherwise.
32 # we're skipping this test, not failing, so exit with 0
33 sys.exit(0)
35 try:
36 import sqlite3
37 except ImportError:
38 try:
39 from pysqlite2 import dbapi2 as sqlite3
40 except ImportError:
41 sys.stderr.write('[SKIPPED] Python sqlite3 module required\n')
42 sys.exit(0)
44 # don't export this name
45 del sys
47 class Failure(Exception):
48 'Base class for exceptions that indicate test failure'
49 pass
51 class Skip(Exception):
52 'Base class for exceptions that indicate test was skipped'
53 pass
55 # import in a specific order: things with the fewest circular imports first.
56 import testcase
57 import wc
58 import verify
59 import tree
60 import sandbox
61 import main
62 import actions
63 import factory