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

Verify test package name when generating tests #131

Open
SteelPhase opened this issue May 15, 2020 · 4 comments
Open

Verify test package name when generating tests #131

SteelPhase opened this issue May 15, 2020 · 4 comments
Assignees
Labels

Comments

@SteelPhase
Copy link

I've noticed that when generating tests, they will generate as invalid if the *_test.go file uses the _test suffix in its package name (i.e.package *_test).

@cweill
Copy link
Owner

cweill commented Dec 26, 2020

I believe the convention is to save the *_test suffix for tests only, so this is working as intended, unless you have a concrete example of when this functionality is needed.

@SteelPhase
Copy link
Author

I've heard it to referred to as external testing, but this page covers the functionality. I'm sure there's more info available

Test files that declare a package with the suffix "_test" will be compiled as a separate package, and then linked and run with the main test binary.

There is an issue on functionality documentation here

@cweill
Copy link
Owner

cweill commented Feb 22, 2021

I see, this is used for test-only packages right? If you want to send a PR to fix this, I'll be happy to approve.

@SteelPhase
Copy link
Author

Yes it is, I'll see if I can come up with a simple way to solve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants