-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bazel tests: delete TestMode and other test junk
The only differences in the test modes, BUILD and SKYLARK, were: - the name of the Mutability, which is insignificant. - whether "BUILD dialect checks", such as no def, no f(**kwargs), are applied. These are moved from syntax.EvaluationTest to packages.PackageFactoryTest. - whether validation errors were reported as events or a thrown exception. Now it's always an exception. - whether the validator gets the 'isBuildFile' flag. This affects a small (and diminishing) set of things, which should be checked directly. The ModalTestCase hierarchy (base, BUILD only, Skylark only, both modes) has been flattened into a single class, Scenario. EvaluationTestCase: - newStarlarkThreadWithSkylarkOptions is now setSemantics (stateful) - inline the code formerly in TestMode and simplify newStarlarkThread et al. - make bad dependencies on build-base explicit. (They are revealed, but not new.) - hide fields - simplify exec(). SkylarkEvaluationTest: - break "extends EvaluationTest" edge: There's no need to duplicate the whole suite for both modes; nearly every test was independent of mode (and one suspects most were added with no knowledge of the intended design). - move tests of FlagGuardedValue into StarlarkFlagGuardingTest. (They were the only tests to use the 'builtins' parameter, now removed.) PiperOrigin-RevId: 294451364
- Loading branch information
1 parent
59d7864
commit 469d855
Showing
13 changed files
with
841 additions
and
1,041 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.