Skip to content

Commit 2577d00

Browse files
authored
Merge pull request #74 from Tieqiong/pkg
migrate from pkg_resources to importlib.resources
2 parents daaf57d + 98c9933 commit 2577d00

14 files changed

+5
-7
lines changed

src/diffpy/structure/tests/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,12 @@ def testsuite(pattern=""):
3535
The TestSuite object containing the matching tests.
3636
"""
3737
import re
38+
from importlib import resources
3839
from itertools import chain
3940
from os.path import dirname
4041

41-
from pkg_resources import resource_filename
42-
4342
loader = unittest.defaultTestLoader
44-
thisdir = resource_filename(__name__, "")
43+
thisdir = str(resources.files(__name__))
4544
depth = __name__.count(".") + 1
4645
topdir = thisdir
4746
for i in range(depth):
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)