-
-
Notifications
You must be signed in to change notification settings - Fork 484
Console app on convert #2089
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
freakboy3742
merged 20 commits into
beeware:main
from
logan-keede:console_app_on_convert
Dec 31, 2024
Merged
Console app on convert #2089
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
f48e547
Adding prompt to set console_app option during convert command
ab286b3
Adding prompt to set console_app option during convert command + cove…
5d0c8bd
Add docstring for new function
17819a4
changelog addition
95b9e5d
proper console_app addition
4387635
merge
d96066f
test modification
9b524c0
test for console_app=GUI
e52713b
better pytest placement
6105119
Update src/briefcase/commands/convert.py
logan-keede 9191fde
Update changes/1900.feature.rst
logan-keede 13818a3
test addition and improvement
4a0a0f6
test addition and improvement
logan-keede ee78b95
Merge branch 'console_app_on_convert' of https://github.com/logan-kee…
f93d1c2
Update test_build_gui_context.py
logan-keede fed75ce
passing pure data as per suggestion
logan-keede c4ac24a
test modification
logan-keede 10ccf08
Correct minor typo.
freakboy3742 cfa31df
Slight refactor of test cases.
freakboy3742 241d056
Modify handling of console_app in the console bootstrap.
freakboy3742 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 @@ | ||
| The "briefcase convert" command can now be used to configure a console-based applications. |
This file contains hidden or 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 hidden or 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 hidden or 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,5 +1,5 @@ | ||
| def test_overrides_are_not_used(convert_command): | ||
| overrides = {"gui_framework": "Toga"} | ||
| def test_overrides_are_used(convert_command): | ||
| overrides = {"gui_framework": "Toga", "console_app": "Console"} | ||
| out = convert_command.build_gui_context({}, overrides) | ||
| assert out == {"gui_framework": "None"} | ||
| assert out == {"gui_framework": "None", "console_app": True} | ||
| assert overrides == {"gui_framework": "Toga"} |
This file contains hidden or 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,33 @@ | ||
| import pytest | ||
|
|
||
|
|
||
| def test_overrides_are_used_for_console(convert_command): | ||
| overrides = {"console_app": "Console"} | ||
| out = convert_command.build_gui_context({}, overrides) | ||
| assert out == {"console_app": True, "gui_framework": "None"} | ||
|
|
||
|
|
||
| def test_overrides_are_used_for_GUI(convert_command): | ||
| overrides = {"console_app": "GUI"} | ||
| out = convert_command.build_gui_context({}, overrides) | ||
| assert out == {"console_app": False, "gui_framework": "None"} | ||
|
|
||
|
|
||
| @pytest.mark.parametrize( | ||
| "input, result", | ||
| [ | ||
| # A GUI app | ||
| (["1"], False), | ||
| # A console app | ||
| (["2"], True), | ||
| # Default value is False (GUI app) | ||
| ([""], False), | ||
| # Invalid values are rejected until a valid value is provided. | ||
| (["x", "y", "2"], True), | ||
| ], | ||
| ) | ||
| def test_app_type(convert_command, input, result): | ||
| """The user can be asked for the app type.""" | ||
| convert_command.input.values = input | ||
| out = convert_command.input_console_app(None) | ||
| assert out == result |
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.