File tree Expand file tree Collapse file tree 4 files changed +74
-0
lines changed
src/diffpy/labpdfproc/tests Expand file tree Collapse file tree 4 files changed +74
-0
lines changed Original file line number Diff line number Diff line change
1
+ flake8
2
+ pytest
3
+ codecov
4
+ coverage
5
+ pytest-env
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python
2
+ ##############################################################################
3
+ #
4
+ # (c) 2024 The Trustees of Columbia University in the City of New York.
5
+ # All rights reserved.
6
+ #
7
+ # File coded by: Billinge Group members and community contributors.
8
+ #
9
+ # See GitHub contributions for a more detailed list of contributors.
10
+ # https://github.com/diffpy/diffpy.labpdfproc/graphs/contributors
11
+ #
12
+ # See LICENSE.rst for license information.
13
+ #
14
+ ##############################################################################
15
+
16
+ """
17
+ Convenience module for debugging the unit tests using
18
+
19
+ python -m diffpy.labpdfproc.tests.debug
20
+
21
+ Exceptions raised by failed tests or other errors are not caught.
22
+ """
23
+
24
+
25
+ if __name__ == "__main__" :
26
+ import sys
27
+
28
+ from diffpy .labpdfproc .tests import testsuite
29
+
30
+ pattern = sys .argv [1 ] if len (sys .argv ) > 1 else ""
31
+ suite = testsuite (pattern )
32
+ suite .debug ()
33
+
34
+
35
+ # End of file
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python
2
+ ##############################################################################
3
+ #
4
+ # (c) 2024 The Trustees of Columbia University in the City of New York.
5
+ # All rights reserved.
6
+ #
7
+ # File coded by: Billinge Group members and community contributors.
8
+ #
9
+ # See GitHub contributions for a more detailed list of contributors.
10
+ # https://github.com/diffpy/diffpy.labpdfproc/graphs/contributors
11
+ #
12
+ # See LICENSE.rst for license information.
13
+ #
14
+ ##############################################################################
15
+ """Convenience module for executing all unit tests with
16
+ python -m diffpy.labpdfproc.tests.run
17
+ """
18
+
19
+ import sys
20
+
21
+ import pytest
22
+
23
+ if __name__ == "__main__" :
24
+ # show output results from every test function
25
+ args = ["-v" ]
26
+ # show the message output for skipped and expected failure tests
27
+ if len (sys .argv ) > 1 :
28
+ args .extend (sys .argv [1 :])
29
+ print ("pytest arguments: {}" .format (args ))
30
+ # call pytest and exit with the return code from pytest
31
+ exit_res = pytest .main (args )
32
+ sys .exit (exit_res )
33
+
34
+ # End of file
You can’t perform that action at this time.
0 commit comments