Skip to content

Commit 9098123

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 d440d10 commit 9098123

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/diffpy/srfit/tests/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ def testsuite(pattern=''):
6161
return suite_all
6262
tcases = chain.from_iterable(tsuites)
6363
for tc in tcases:
64-
tcwords = tc.id().rsplit('.', 2)
65-
shortname = '.'.join(tcwords[-2:])
64+
tcwords = tc.id().split('.')
65+
shortname = '.'.join(tcwords[-3:])
6666
if rx.search(shortname):
6767
suite.addTest(tc)
6868
# verify all tests are found for an empty pattern.

0 commit comments

Comments
 (0)