test(processor): remove code comments from wholefile_test
This commit is contained in:
@@ -16,11 +16,11 @@ var update = flag.Bool("update", false, "update golden files")
|
|||||||
|
|
||||||
type wholeFileCase struct {
|
type wholeFileCase struct {
|
||||||
name string
|
name string
|
||||||
file string // fixture under testdata/, e.g. "py_inline.py"
|
file string
|
||||||
cli types.CLI
|
cli types.CLI
|
||||||
cfg *config.Config // nil => config.Default()
|
cfg *config.Config
|
||||||
gitMode bool // true => processFileWithLineRanges (surgical git path)
|
gitMode bool
|
||||||
ranges []git.LineRange // used only when gitMode; nil => whole file
|
ranges []git.LineRange
|
||||||
wantBackup bool
|
wantBackup bool
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,9 +65,6 @@ func runWholeFileCase(t *testing.T, tc wholeFileCase) {
|
|||||||
|
|
||||||
golden := src + ".golden"
|
golden := src + ".golden"
|
||||||
if *update {
|
if *update {
|
||||||
// Goldens are hand-verified expected values. Regenerating under CI would
|
|
||||||
// let the suite pass unconditionally while overwriting the checked-in
|
|
||||||
// goldens — the exact regression the golden strategy exists to catch.
|
|
||||||
if os.Getenv("CI") != "" {
|
if os.Getenv("CI") != "" {
|
||||||
t.Fatal("-update must not be used in CI: it overwrites goldens and makes assertions trivially pass")
|
t.Fatal("-update must not be used in CI: it overwrites goldens and makes assertions trivially pass")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user