Skip to content

Create run.py #57

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions diffpy/pdfmorph/tests/run.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

#!/usr/bin/env python
##############################################################################
#
# diffpy.structure by DANSE Diffraction group
# Simon J. L. Billinge
# (c) 2010 Trustees of the Columbia University
# in the City of New York. All rights reserved.
#
# File coded by: Pavol Juhas
#
# See AUTHORS.txt for a list of people who contributed.
# See LICENSE_DANSE.txt for license information.
#
##############################################################################

"""Convenience module for executing all unit tests with
python -m diffpy.structure.tests.run
"""


if __name__ == '__main__':
import sys
# show warnings by default
if not sys.warnoptions:
import os, warnings
warnings.simplefilter("default")
# also affect subprocesses
os.environ["PYTHONWARNINGS"] = "default"
from diffpy.pdfmorph.tests import test
# produce zero exit code for a successful test
sys.exit(not test().wasSuccessful())