Skip to content

Commit ebabd59

Browse files
committed
Merge branch 'common-diffpy-patches-py2'
2 parents 2597b3e + 3852156 commit ebabd59

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
/devutils export-ignore
66
/doc export-ignore
77
.gitarchive.cfg export-subst
8+
*.bat text eol=crlf

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The diffpy.Structure requires Python 2.7 and the following software:
3232
* ``setuptools`` - software distribution tools for Python
3333
* ``NumPy`` - numerical mathematics and fast array operations for Python
3434

35-
We recommend to use `Anaconda Python <https://www.continuum.io/downloads>`_
35+
We recommend to use `Anaconda Python <https://www.anaconda.com/download>`_
3636
as it allows to install all software dependencies together with
3737
diffpy.Structure. For other Python distributions it is necessary to
3838
install the required software separately. As an example on Ubuntu

src/diffpy/Structure/tests/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ def testsuite(pattern=''):
5454
return suite_all
5555
tcases = chain.from_iterable(tsuites)
5656
for tc in tcases:
57-
tcwords = tc.id().rsplit('.', 2)
58-
shortname = '.'.join(tcwords[-2:])
57+
tcwords = tc.id().split('.')
58+
shortname = '.'.join(tcwords[-3:])
5959
if rx.search(shortname):
6060
suite.addTest(tc)
6161
# verify all tests are found for an empty pattern.

src/diffpy/Structure/tests/run.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@
2121

2222
if __name__ == '__main__':
2323
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"
2430
from diffpy.Structure.tests import test
2531
# produce zero exit code for a successful test
2632
sys.exit(not test().wasSuccessful())

0 commit comments

Comments
 (0)