Actions

class bast3st.decisions.Action[source]
type bast3st.actions.LevelT = Literal['maintest', 'alttest', 'thistest', 'category', 'spec']
bast3st.actions.end_this_test_immediatly(explaination, *mode)[source]
Parameters:
Return type:

Action[Features | Literal[‘f-end-this-test’]]

bast3st.actions.fail_this_test_immediatly(explaination)[source]
Parameters:

explaination (IntoTextValue[Features])

Return type:

Action[Features | Literal[‘f-end-this-test’]]

bast3st.actions.pass_this_test_immediatly(explaination)[source]
Parameters:

explaination (IntoTextValue[Features])

Return type:

Action[Features | Literal[‘f-end-this-test’]]

bast3st.actions.send_error(text: IntoTextValue[Features], level: None = None) → Action[Features][source]
bast3st.actions.send_error(text: IntoTextValue[Features], level: Literal['maintest']) → Action[Features | Literal['f-sendmsg-maintest']]
bast3st.actions.send_error(text: IntoTextValue[Features], level: Literal['category']) → Action[Features | Literal['f-sendmsg-category']]
bast3st.actions.send_error(text: IntoTextValue[Features], level: Literal['spec']) → Action[Features]
Parameters:
Return type:

Action

bast3st.actions.send_info(text: IntoTextValue[Features], level: None = None) → Action[Features][source]
bast3st.actions.send_info(text: IntoTextValue[Features], level: Literal['maintest']) → Action[Features | Literal['f-sendmsg-maintest']]
bast3st.actions.send_info(text: IntoTextValue[Features], level: Literal['category']) → Action[Features | Literal['f-sendmsg-category']]
bast3st.actions.send_info(text: IntoTextValue[Features], level: Literal['spec']) → Action[Features]
Parameters:
Return type:

Action

bast3st.actions.send_message(text: IntoTextValue[Features], severity: Literal['info', 'warning', 'error'], level: None = None) → Action[Features][source]
bast3st.actions.send_message(text: IntoTextValue[Features], severity: Literal['info', 'warning', 'error'], level: Literal['maintest']) → Action[Features | Literal['f-sendmsg-maintest']]
bast3st.actions.send_message(text: IntoTextValue[Features], severity: Literal['info', 'warning', 'error'], level: Literal['category']) → Action[Features | Literal['f-sendmsg-category']]
Parameters:
Return type:

Action

bast3st.actions.send_warning(text: IntoTextValue[Features], level: None = None) → Action[Features][source]
bast3st.actions.send_warning(text: IntoTextValue[Features], level: Literal['maintest']) → Action[Features | Literal['f-sendmsg-maintest']]
bast3st.actions.send_warning(text: IntoTextValue[Features], level: Literal['category']) → Action[Features | Literal['f-sendmsg-category']]
bast3st.actions.send_warning(text: IntoTextValue[Features], level: Literal['spec']) → Action[Features]
Parameters:
Return type:

Action

bast3st.actions.set_flag(first_key, *other_keys, value)[source]

Set a custom key to a custom value that can be accessed using this key during other stages.

Note that empty strings take a special position as key-components. If you assign a non-mapping value to (“level1”, “level2”) and then assign a value to (“level1”, “level2”, “newlevel”) a new level needs to be created to store the second value. The first one will from there on be available as (“level1”, “level2”, “”) and no longer as (“level1”, “level2”) which will be the mapping containing “” and “newlevel”. But no one stops you from using empty strings as keys, it could just cause weird effects.

Flags set during the evaluation of one value are typically only available after the completion of the entire evaluation i.e. a if a value that executed this action by catching an error is used for a value that tries to read this flag, this last set will be invisible. See the documentation for detailed flag-visibility rules, you may be surprised.

Flags form a nested mapping and the test specification is free to specify them in a useful hierarchy of levels for structuring communication.

You have to use at least one key level (you can’t set the top-level flags mapping).

Parameters:
Return type:

Action[Features | Features2 | Features3]