Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test name resolving logic #62

Closed
cptartur opened this issue Jul 6, 2023 · 0 comments · Fixed by #380
Closed

Fix test name resolving logic #62

cptartur opened this issue Jul 6, 2023 · 0 comments · Fixed by #380
Assignees

Comments

@cptartur
Copy link
Member

cptartur commented Jul 6, 2023

software-mansion/protostar#2093

Compiler's collect_tests adds whole paths in the filesystem to test names that are defined inline with the implementation.

e.g.
/abs/path/to/file/src::test_fib
instead of just
src::test_fib

In #1999 basic handling for this was added by just stripping the path from the name.

We should introduce the required changes to test collecting so paths are not included in the first place and remove the stripping logic.

There's a high chance this is related to #2092, so we should first resolve #2092 before starting this issue.

@cptartur cptartur added this to the Forge milestone Jul 6, 2023
@cptartur cptartur moved this to Backlog in Starknet foundry Jul 6, 2023
@bartekryba bartekryba self-assigned this Jul 24, 2023
@bartekryba bartekryba moved this from Backlog to TODO in Starknet foundry Jul 24, 2023
@MaksymilianDemitraszek MaksymilianDemitraszek removed this from the Forge milestone Jul 26, 2023
@piotmag769 piotmag769 moved this from TODO to In Progress in Starknet foundry Jul 27, 2023
@bartekryba bartekryba mentioned this issue Aug 2, 2023
4 tasks
github-merge-queue bot pushed a commit that referenced this issue Aug 7, 2023
<!-- Reference any GitHub issues resolved by this PR -->

Closes #62

## Introduced changes

<!-- A brief description of the changes -->

- Replaced `src` with package name in test collecting.
- Removed duplication of file names of tests outside the package tree.
- Removed `setup_project` function and replaced usage of it with
`setup_single_file_project`, as the remaining if branch in
`setup_project` wasn't used anyways. Did similar thing with library
collection.

## Breaking changes

<!-- List of all breaking changes, if applicable -->

## Checklist

<!-- Make sure all of these are complete -->

- [x] Linked relevant issue
- [x] Updated relevant documentation
- [x] Added relevant tests
- [x] Performed self-review of the code
@github-project-automation github-project-automation bot moved this from In Progress to Done in Starknet foundry Aug 7, 2023
Utilitycoder pushed a commit to Utilitycoder/starknet-foundry that referenced this issue Oct 6, 2023
* Fixed some typos

* fix(arrays): remove mut attribute

---------

Co-authored-by: msaug <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants