Skip to content

Commit 615914e

Browse files
Add unittest for new feature
1 parent 3f0f990 commit 615914e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

client/configuration/tests/search_path_test.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,3 +249,13 @@ def test_process_required_raw_elements_site_package_nonexistence(self) -> None:
249249
site_roots=[],
250250
required=True,
251251
)
252+
253+
def test_toplevel_module_not_pyfile(self):
254+
Path.mkdir(Path("foo"))
255+
Path.mkdir(Path("foo/bar-1.0.0.dist-info"))
256+
Path.touch(Path("foo/bar.so"))
257+
258+
with open("foo/bar-1.0.0.dist-info/RECORD", "w", encoding="UTF-8") as f:
259+
f.write("bar.so")
260+
261+
self.assertEqual(SitePackageElement("foo", "bar", True).path(), "foo/bar.so")

0 commit comments

Comments
 (0)