-
-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Keep ctrl-c working with enaml-run (#328)
* Keep ctrl-c working with enaml-run * Update release notes * Add test for enaml-run
- Loading branch information
1 parent
2a6caab
commit ac85d1f
Showing
3 changed files
with
30 additions
and
0 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,24 @@ | ||
import sys | ||
import pytest | ||
from utils import enaml_run | ||
|
||
from enaml.application import Application, deferred_call | ||
from enaml.runner import main | ||
|
||
|
||
@pytest.fixture | ||
def sys_argv(): | ||
""" Fixture that saves sys.argv and restores it after the test completes | ||
""" | ||
argv = sys.argv | ||
try: | ||
yield | ||
finally: | ||
sys.argv = argv | ||
|
||
|
||
def test_runner(enaml_run, sys_argv): | ||
sys.argv = ['enaml-run', 'examples/stdlib/mapped_view.enaml'] | ||
main() | ||
|