Skip to content

Commit 5540fde

Browse files
committed
TST: include module name when matching test names
Match test selection pattern to `testmodule.TestClass.test_method` rather than to `TestClass.test_method` which may be ambiguous.
1 parent 112ee3b commit 5540fde

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/diffpy/pdfgui/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.

0 commit comments

Comments
 (0)