Statistics
| Branch: | Tag: | Revision:

root / snf-quotaholder-app / quotaholder_django / test / __main__.py @ 007ba2b4

History | View | Annotate | Download (2.3 kB)

1 3e5941c1 Giorgos Korfiatis
# Copyright 2012 GRNET S.A. All rights reserved.
2 3e5941c1 Giorgos Korfiatis
#
3 3e5941c1 Giorgos Korfiatis
# Redistribution and use in source and binary forms, with or
4 3e5941c1 Giorgos Korfiatis
# without modification, are permitted provided that the following
5 3e5941c1 Giorgos Korfiatis
# conditions are met:
6 3e5941c1 Giorgos Korfiatis
#
7 3e5941c1 Giorgos Korfiatis
#   1. Redistributions of source code must retain the above
8 3e5941c1 Giorgos Korfiatis
#      copyright notice, this list of conditions and the following
9 3e5941c1 Giorgos Korfiatis
#      disclaimer.
10 3e5941c1 Giorgos Korfiatis
#
11 3e5941c1 Giorgos Korfiatis
#   2. Redistributions in binary form must reproduce the above
12 3e5941c1 Giorgos Korfiatis
#      copyright notice, this list of conditions and the following
13 3e5941c1 Giorgos Korfiatis
#      disclaimer in the documentation and/or other materials
14 3e5941c1 Giorgos Korfiatis
#      provided with the distribution.
15 3e5941c1 Giorgos Korfiatis
#
16 3e5941c1 Giorgos Korfiatis
# THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
17 3e5941c1 Giorgos Korfiatis
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 3e5941c1 Giorgos Korfiatis
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 3e5941c1 Giorgos Korfiatis
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
20 3e5941c1 Giorgos Korfiatis
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 3e5941c1 Giorgos Korfiatis
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 3e5941c1 Giorgos Korfiatis
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
23 3e5941c1 Giorgos Korfiatis
# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
24 3e5941c1 Giorgos Korfiatis
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 3e5941c1 Giorgos Korfiatis
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
26 3e5941c1 Giorgos Korfiatis
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 3e5941c1 Giorgos Korfiatis
# POSSIBILITY OF SUCH DAMAGE.
28 3e5941c1 Giorgos Korfiatis
#
29 3e5941c1 Giorgos Korfiatis
# The views and conclusions contained in the software and
30 3e5941c1 Giorgos Korfiatis
# documentation are those of the authors and should not be
31 3e5941c1 Giorgos Korfiatis
# interpreted as representing official policies, either expressed
32 3e5941c1 Giorgos Korfiatis
# or implied, of GRNET S.A.
33 3e5941c1 Giorgos Korfiatis
34 7f479bb1 Christos KK Loverdos
from sys import argv,executable
35 f6d15c9b Christos KK Loverdos
from os.path import dirname
36 fc438cf2 Christos KK Loverdos
from config import run_test_cases
37 fc438cf2 Christos KK Loverdos
from config import printf
38 902f1fb9 Christos KK Loverdos
from limits import LimitsTest
39 f6d15c9b Christos KK Loverdos
from createrelease import CreateReleaseListAPITest
40 239b068c Christos KK Loverdos
41 f6d15c9b Christos KK Loverdos
HERE = dirname(__file__)
42 239b068c Christos KK Loverdos
43 239b068c Christos KK Loverdos
# Enumerate all test cases to run.
44 239b068c Christos KK Loverdos
# In the command line use
45 239b068c Christos KK Loverdos
#   $ python test
46 239b068c Christos KK Loverdos
# to run them all
47 239b068c Christos KK Loverdos
48 239b068c Christos KK Loverdos
all_cases = [
49 f611ef3d Prodromos Gerakios
    CreateReleaseListAPITest,
50 902f1fb9 Christos KK Loverdos
    LimitsTest
51 239b068c Christos KK Loverdos
]
52 239b068c Christos KK Loverdos
53 39a725a6 Christos KK Loverdos
printf("=======================================================")
54 39a725a6 Christos KK Loverdos
printf("Using {0} {1}", executable, ' '.join(argv))
55 39a725a6 Christos KK Loverdos
printf("Running tests from {0}", HERE)
56 39a725a6 Christos KK Loverdos
printf("=======================================================")
57 39a725a6 Christos KK Loverdos
printf("All tests are:")
58 7f479bb1 Christos KK Loverdos
for test_case in all_cases:
59 39a725a6 Christos KK Loverdos
    printf("  {0}", test_case.__name__)
60 ce1734ce Christos KK Loverdos
run_test_cases(all_cases)
61 39a725a6 Christos KK Loverdos
printf("=======================================================")
62 3e5941c1 Giorgos Korfiatis
printf("")