Skip to content

Fix pytest imports and document local/VS Code test workflow - #17

Closed
IliTheButterfly wants to merge 5 commits into
devfrom
codex/fix-pytest-and-add-testing-documentation
Closed

Fix pytest imports and document local/VS Code test workflow#17
IliTheButterfly wants to merge 5 commits into
devfrom
codex/fix-pytest-and-add-testing-documentation

Conversation

@IliTheButterfly

Copy link
Copy Markdown
Owner

Motivation

  • Tests were failing to import package modules because they referenced src.eb_macro_gen instead of the installed package namespace, causing pytest collection errors.
  • Developers need clear instructions to run tests locally and from VS Code with the repository src/ layout.

Description

  • Updated tests to import from the package namespace (eb_macro_gen) instead of src.eb_macro_gen so imports work when running tests from the repo root.
  • Added pytest configuration in pyproject.toml with pythonpath = ["src"] and testpaths = ["tests"] to ensure consistent discovery with the src/ layout.
  • Added a .vscode/settings.json file that configures VS Code testing to use pytest, sets the test args to tests, sets the workspace cwd, and adds ${workspaceFolder}/src to python.analysis.extraPaths for editor resolution.
  • Added a Running tests section to ReadMe.md describing how to run tests via the CLI and how to use the preconfigured VS Code testing setup.

Testing

  • Ran pytest -q after the changes and all tests passed: 18 passed in 0.27s.

Codex Task

@IliTheButterfly
IliTheButterfly deleted the codex/fix-pytest-and-add-testing-documentation branch April 21, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant