-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Table_Tests to the builder API (#8622)
Refactor `test/Table_Test` to the builder API. The builder API is in a new library called `Test_New` that is alongside the old `Test` library. There will be follow-up PRs that will migrate the rest of the tests. Meanwhile, let's keep these two libraries, and merge them after the last PR. # Important Notes - For a brief introduction into the new API, see **Prototype 1** section in #8622 (comment) - When executing all the tests, the behavior should be the same as with the old library. With the only exception that if `ENSO_TEST_ANSI_COLORS` env var is set, the output is more colorful than it used to be.
- Loading branch information
Showing
97 changed files
with
8,930 additions
and
5,315 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: Test_New | ||
namespace: Standard | ||
version: 0.0.0-dev | ||
license: APLv2 | ||
authors: | ||
- name: Enso Team | ||
email: [email protected] | ||
maintainers: | ||
- name: Enso Team | ||
email: [email protected] |
11 changes: 11 additions & 0 deletions
11
distribution/lib/Standard/Test_New/0.0.0-dev/src/Clue.enso
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
private | ||
|
||
## PRIVATE | ||
type Clue | ||
## PRIVATE | ||
|
||
Represents a clue as to why a test failed | ||
|
||
Arguments: | ||
- add_clue: either Nothing or a function which modifies a failure message | ||
Value add_clue |
15 changes: 15 additions & 0 deletions
15
distribution/lib/Standard/Test_New/0.0.0-dev/src/Execution_Context_Helpers.enso
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from Standard.Base import all | ||
import Standard.Base.Runtime.Context | ||
|
||
import project.Test.Test | ||
|
||
## PRIVATE | ||
Runs the action twice, once with the Output context enabled and once with it | ||
disabled, to check that the behaviour is the same regardless of context. | ||
run_with_and_without_output ~action = | ||
Context.Output.with_enabled <| | ||
Test.with_clue "(normal mode - Output context enabled) " <| | ||
action | ||
Context.Output.with_disabled <| | ||
Test.with_clue "(dry run - Output context disabled) " <| | ||
action |
Oops, something went wrong.