generated from datalad/datalad-extension-template
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Implement with_testsui
replacement as fixture
#423
Comments
mih
added a commit
to mih/datalad-next
that referenced
this issue
Jun 21, 2023
mih
added a commit
to mih/datalad-next
that referenced
this issue
Jun 21, 2023
mih
added a commit
to mih/datalad-next
that referenced
this issue
Jun 21, 2023
This provides two fixtures - `datalad_interactive_ui` - `datalad_noninteractive_ui` that can be used to test user interaction or communication sequences. Unlike the datalad-core test UI, this is not only provisioning user input. In addition, it allows for inspecting a detailed UI call log, and offers a text-rendering to easy debugging: ``` (Pdb) print(iu) InteractiveTestUI( question: (('attr1',), {'title': 'dummyquestion'}) response: attr1 question: (('attr2',), {'title': None}) response: attr2 question: (('secret',), {'title': None, 'repeat': True, 'hidden': True}) response: secret (unused responses: []) ) ``` Closes datalad#423
mih
added a commit
to mih/datalad-next
that referenced
this issue
Jun 21, 2023
This provides two fixtures - `datalad_interactive_ui` - `datalad_noninteractive_ui` that can be used to test user interaction or communication sequences. Unlike the datalad-core test UI, this is not only provisioning user input. In addition, it allows for inspecting a detailed UI call log, and offers a text-rendering to easy debugging: ``` (Pdb) print(iu) InteractiveTestUI( question: (('attr1',), {'title': 'dummyquestion'}) response: attr1 question: (('attr2',), {'title': None}) response: attr2 question: (('secret',), {'title': None, 'repeat': True, 'hidden': True}) response: secret (unused responses: []) ) ``` Closes datalad#423
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
with_testui
is useful for passing precrafted user input to code for user interaction. However, the implementation in datalad-core fully replaced the UI and is not just passing the inputs. This makes it impossible to implement that aim to ensure a particular user interaction (flow of questions and responses), because no output is generated and fixtures likecapsys
ofcapfd
cannot be used.The text was updated successfully, but these errors were encountered: