Skip to content

Stop compiling and testing packages in testdata#488

Merged
riannucci merged 1 commit intosmartystreets:masterfrom
CtrlZvi:ignore_testdata_packages
Apr 27, 2021
Merged

Stop compiling and testing packages in testdata#488
riannucci merged 1 commit intosmartystreets:masterfrom
CtrlZvi:ignore_testdata_packages

Conversation

@CtrlZvi
Copy link
Copy Markdown

@CtrlZvi CtrlZvi commented Jun 9, 2017

Go tooling, including go test treat the testdata directory as an opaque
directory containing data for tests. Unfortunately, goconvey would treat go
source files inside testdata or its subdirectories as creating a package,
causing divergence in behavior from Go tooling.

This commit causes goconvey to not treat anything inside the testdata
directory or subdirectories as a package without removing them from the watch
list. This creates behavioral parity with Go tooling, but means a change in
testdata will still cause tests to be rerun.

Comment thread goconvey.go
return packageList
}

func isInsideTestdata(folder *messaging.Folder) bool {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a comment to this function explaining the situation?

Copy link
Copy Markdown
Collaborator

@riannucci riannucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me with the additional docstring

Go tooling, including `go test` treat the testdata directory as an opaque
directory containing data for tests. Unfortunately, goconvey would treat go
source files inside testdata or its subdirectories as creating a package,
causing divergence in behavior from Go tooling.

This commit causes goconvey to not treat anything inside the testdata
directory or subdirectories as a package without removing them from the watch
list. This creates behavioral parity with Go tooling, but means a change in
testdata will still cause tests to be rerun.
@CtrlZvi CtrlZvi force-pushed the ignore_testdata_packages branch from 5665823 to 6205260 Compare March 29, 2019 15:07
@riannucci riannucci merged commit 0fc5ef5 into smartystreets:master Apr 27, 2021
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