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 {
|
||||
name string
|
||||
file string // fixture under testdata/, e.g. "py_inline.py"
|
||||
file string
|
||||
cli types.CLI
|
||||
cfg *config.Config // nil => config.Default()
|
||||
gitMode bool // true => processFileWithLineRanges (surgical git path)
|
||||
ranges []git.LineRange // used only when gitMode; nil => whole file
|
||||
cfg *config.Config
|
||||
gitMode bool
|
||||
ranges []git.LineRange
|
||||
wantBackup bool
|
||||
}
|
||||
|
||||
@@ -65,9 +65,6 @@ func runWholeFileCase(t *testing.T, tc wholeFileCase) {
|
||||
|
||||
golden := src + ".golden"
|
||||
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") != "" {
|
||||
t.Fatal("-update must not be used in CI: it overwrites goldens and makes assertions trivially pass")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user