Skip to content

Commit c72f4f0

Browse files
authored
Merge pull request #57 from chloeann95/patch-1
Create run.py
2 parents c1b6eb9 + 6524c05 commit c72f4f0

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

diffpy/pdfmorph/tests/run.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
#!/usr/bin/env python
3+
##############################################################################
4+
#
5+
# diffpy.structure by DANSE Diffraction group
6+
# Simon J. L. Billinge
7+
# (c) 2010 Trustees of the Columbia University
8+
# in the City of New York. All rights reserved.
9+
#
10+
# File coded by: Pavol Juhas
11+
#
12+
# See AUTHORS.txt for a list of people who contributed.
13+
# See LICENSE_DANSE.txt for license information.
14+
#
15+
##############################################################################
16+
17+
"""Convenience module for executing all unit tests with
18+
python -m diffpy.structure.tests.run
19+
"""
20+
21+
22+
if __name__ == '__main__':
23+
import sys
24+
# show warnings by default
25+
if not sys.warnoptions:
26+
import os, warnings
27+
warnings.simplefilter("default")
28+
# also affect subprocesses
29+
os.environ["PYTHONWARNINGS"] = "default"
30+
from diffpy.pdfmorph.tests import test
31+
# produce zero exit code for a successful test
32+
sys.exit(not test().wasSuccessful())

0 commit comments

Comments
 (0)