-
-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Description
Hi
there appears to be an general issue with Basilisp 0.3.6 when running basilisp test without explicitly specifying a path:
AssertionError: Must have at least one module name
To reproduce,
- create a new Poetry Basilisp project, and create a
tests/issue_test.lpyfile with a minimal test case (or clone https://github.com/ikappaki/issue-bas-test-path-dot)
(ns tests.issue-test
(:require [basilisp.test :refer [deftest is]]))
(deftest abc
(is (= 5 0)))- Run
basilisp testthe above error is returned:
$ poetry run basilisp test
=================================================== test session starts ===================================================
platform win32 -- Python 3.11.4, pytest-8.3.4, pluggy-1.5.0
rootdir: d:\bas\issue-bas-test-path-dot
configfile: pyproject.toml
plugins: basilisp-0.3.6
collected 0 items / 1 error
__________________________________________ ERROR collecting tests/issue_test.lpy __________________________________________
.venv\Lib\site-packages\basilisp\contrib\pytest\testrunner.py:270: in collect
module = self._import_module()
.venv\Lib\site-packages\basilisp\contrib\pytest\testrunner.py:247: in _import_module
assert modnames, "Must have at least one module name"
E AssertionError: Must have at least one module name
E assert []
...A workaround is to include the FQD name of the project directory when running basilisp test:
$ poetry run basilisp test -p <project dir>
platform win32 -- Python 3.11.4, pytest-8.3.4, pluggy-1.5.0
rootdir: d:\bas\issue-bas-test-path-dot
configfile: pyproject.toml
plugins: basilisp-0.3.6
collected 1 item
tests\issue_test.lpy F [100%]
___________________________________________________________ abc ___________________________________________________________
FAIL in (abc) (issue_test.lpy:5)
Test failure: (= 5 0)
expected: 5
actual: 0
...This issue seems to be related to a regression in (#1176), which I thought I previously tested with success, but it was in a slightly more complex setup that did not cover this basic case.
PR to follow.
Thanks
zachcp
Metadata
Metadata
Assignees
Labels
No labels