File tree Expand file tree Collapse file tree 1 file changed +5
-23
lines changed
src/basilisp/contrib/pytest Expand file tree Collapse file tree 1 file changed +5
-23
lines changed Original file line number Diff line number Diff line change @@ -185,29 +185,11 @@ def _get_fully_qualified_module_names(file: Path) -> list[str]:
185185 for pth in sys .path :
186186 root = Path (pth )
187187 if file .is_relative_to (root ):
188- paths .append (root )
189-
190- if not paths :
191- top = None
192- for p in file .parents :
193- if _is_package (p ):
194- top = p
195- else :
196- break
197-
198- if top is None or top == file .parent :
199- return [file .stem ]
200-
201- paths .append (top .parent )
202-
203- computed_paths = []
204- for path in paths :
205- elems = list (file .with_suffix ("" ).relative_to (path ).parts )
206- if elems [- 1 ] == "__init__" :
207- elems .pop ()
208- computed_paths .append ("." .join (elems ))
209-
210- return computed_paths
188+ elems = list (file .with_suffix ("" ).relative_to (pth ).parts )
189+ if elems [- 1 ] == "__init__" :
190+ elems .pop ()
191+ paths .append ("." .join (elems ))
192+ return paths
211193
212194
213195class BasilispFile (pytest .File ):
You can’t perform that action at this time.
0 commit comments