Skip to content

Commit

Permalink
Avoid deprecated test loader function.
Browse files Browse the repository at this point in the history
Closes #16
  • Loading branch information
scoder committed Mar 14, 2022
1 parent dc77e21 commit 4961e68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fastrlock/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ def suite():
tests = []
for filename in os.listdir(test_dir):
if filename.endswith('.py') and not filename.startswith('_'):
tests.append(unittest.findTestCases('tests.'+ filename[:-3]))
tests.append(unittest.defaultTestLoader.loadTestsFromName(__name__ + '.' + filename[:-3]))

suite = unittest.TestSuite(tests)
suite = unittest.TestSuite(tests) if len(tests) != 1 else tests[0]
suite.addTest(doctest.DocFileSuite('../../README.rst'))
return suite

Expand Down

0 comments on commit 4961e68

Please sign in to comment.