-
-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: run console under providercontext [APE-1529] (#1733)
* fix: run console under providercontext * fix: actually persist state across exceptions * fix: add type hint to classvar * fix: lint * fix: add comments, recursive interactive check * fix: add test verifying state persists * fix: update test to use set_timestamp instead
- Loading branch information
Showing
8 changed files
with
73 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
import click | ||
|
||
import ape | ||
|
||
|
||
@click.command(short_help="Use a subcommand") | ||
def cli(): | ||
local_variable = "test foo bar" # noqa[F841] | ||
provider = ape.chain.provider | ||
provider.set_timestamp(123123123123123123) | ||
raise Exception("Expected exception") # noqa: T001 |
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 |
---|---|---|
@@ -1,3 +1,8 @@ | ||
import ape | ||
|
||
|
||
def main(): | ||
local_variable = "test foo bar" # noqa[F841] | ||
provider = ape.chain.provider | ||
provider.set_timestamp(123123123123123123) | ||
raise Exception("Expected exception") |
4 changes: 4 additions & 0 deletions
4
tests/integration/cli/projects/script/scripts/error_no_def.py
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 |
---|---|---|
@@ -1,2 +1,6 @@ | ||
import ape | ||
|
||
local_variable = "test foo bar" # noqa[F841] | ||
provider = ape.chain.provider | ||
provider.set_timestamp(123123123123123123) | ||
raise Exception("Expected exception") |
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