`deftest` generation at the REPL pollutes the namespace
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 301
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
clojure.test/deftest expends to def. It is named.
When tests expands to clojure.test/deftest, a unique name is generated (based on the line number).
If you move a tests block and re-evaluate it, the generated test get a new identity. It doesn’t overwrite its previous version, polluting the namespace.
All tests (current and previous versions) will be executed by clojure.test/run-tests.
Find a way to provide a stable identity to deftest, or to generate tests differently.
(t/deftest test-identity-name …)
Thanks to @seancorfield on Clojurians Slack for reporting the issue.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the implementation behind the tests expansion and clojure.test/deftest, then reproduce re-evaluation at the REPL and inspect what clojure.test/run-tests executes. Done means moving and re-evaluating a tests block no longer leaves an earlier generated test identity in the namespace or causes it to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100