Skip to content

Conversation

@AtwoodHuang
Copy link

fix bug in #178

cweill added a commit that referenced this pull request Oct 21, 2025
## Fix Issue #188: Proper t.Parallel() Generation
- Add t.Parallel() at the top level of test functions when -parallel is used
- Keep t.Parallel() in subtests as well for optimal parallelism
- This satisfies the tparallel linter and Go testing best practices
- Updated both standard and testify templates
- Updated all golden test files to reflect new behavior

## Fix PR #179: Missing Import Paths
- When receiver and methods are in different files, imports from all files
  in the package are now included in the generated test
- Fixes compilation errors when types come from separate files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
cweill added a commit that referenced this pull request Oct 21, 2025
## Fix Issue #188: Proper t.Parallel() Generation
- Add t.Parallel() at the top level of test functions when -parallel is used
- Keep t.Parallel() in subtests as well for optimal parallelism
- This satisfies the tparallel linter and Go testing best practices
- Updated both standard and testify templates
- Updated all golden test files to reflect new behavior

## Fix PR #179: Missing Import Paths
- When receiver and methods are in different files, imports from all files
  in the package are now included in the generated test
- Fixes compilation errors when types come from separate files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@cweill
Copy link
Owner

cweill commented Oct 21, 2025

Thank you so much for this important bug fix! 🎉

This fix has been integrated into v1.7.0. Generated tests now correctly collect imports from all files in a package, not just the main source file. This prevents compilation errors when receiver types and methods are defined in different files.

Your contribution is part of the modernization effort that brought gotests back to life after 5 years. Really appreciate your patience and the thorough investigation of this bug!

Check out the release: https://github.com/cweill/gotests/releases/tag/v1.7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants