File: __main__.py

package info (click to toggle)
python-ase 3.12.0-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 14,192 kB
  • ctags: 8,112
  • sloc: python: 93,375; sh: 99; makefile: 94
file content (28 lines) | stat: -rw-r--r-- 884 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import optparse
import sys

from ase.test import test

usage = ('Usage: python -m ase.test [-c calc1,calc2,...] '
         '[test1.py test2.py ...]')
parser = optparse.OptionParser(usage=usage, description='Test ASE')

parser.add_option('-c', '--calculators',
                  help='Comma-separated list of calculators to test.')
parser.add_option('-v', '--verbosity', type=int, default=2, metavar='N',
                  help='Use 0, 1 or 2.')
parser.add_option('-g', '--test-also-gui', action='store_true',
                  help='Test also ase-gui.')

opts, args = parser.parse_args()

if opts.calculators:
    calculators = opts.calculators.split(',')
else:
    calculators = []

results = test(display=opts.test_also_gui,
               verbosity=opts.verbosity,
               calculators=calculators,
               files=args)
sys.exit(len(results.errors + results.failures))