* subversion/tests/cmdline/svntest/sandbox.py
[svnrdump.git] / svntest / __init__.py
blob42c4721f77a91bdf6de8190cb309664725f42626
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 __all__ = ["main", "tree", "actions"]
23 import sys
24 if sys.hexversion < 0x2040000:
25 sys.stderr.write('[SKIPPED] at least Python 2.4 is required\n')
27 # note: exiting is a bit harsh for a library module, but we really do
28 # require Python 2.4. this package isn't going to work otherwise.
30 # we're skipping this test, not failing, so exit with 0
31 sys.exit(0)
32 try:
33 import sqlite3
34 except ImportError:
35 try:
36 from pysqlite2 import dbapi2 as sqlite3
37 except ImportError:
38 sys.stderr.write('[SKIPPED] Python sqlite3 module required\n')
39 sys.exit(0)
41 # don't export this name
42 del sys
44 class Failure(Exception):
45 'Base class for exceptions that indicate test failure'
46 pass
48 class Skip(Exception):
49 'Base class for exceptions that indicate test was skipped'
50 pass
52 # import in a specific order: things with the fewest circular imports first.
53 import testcase
54 import wc
55 import verify
56 import tree
57 import sandbox
58 import main
59 import actions
60 import factory