From 47a829044c90a8220d997517257abf5e9d1484e4 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 8 Dec 2023 18:43:01 +0100 Subject: [PATCH] WIP --- prototyping/documentation.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/prototyping/documentation.md b/prototyping/documentation.md index 8581223..e27c359 100644 --- a/prototyping/documentation.md +++ b/prototyping/documentation.md @@ -67,7 +67,7 @@ Furthermore, some `Runner` classes can depend on others. For example, `RunnerWor | 9. | Wordpress-2 | cleanups | -# Create a Runner +# Create a custom Runner To comprehend the process of creating a new subclass of `Runner`, let's examine a simplified rendition of the `RunnerWordpress` class. Within it, there exist two setup scripts and two test scripts, one of which operates conditionally. @@ -88,3 +88,17 @@ class RunnerWordpress(Runner): ] cleanups = [] ``` + +The signature of condition functions can be seen below. The function takes one `NamedTuple` and returns of type `bool`. You can learn about the contents of the input by looking up the class `ConditionArgs`. Generally speaking, it provides access to all of the .env files, especially the one related to the current Runner. + +```python +def condition_function(args: ConditionArgs) -> bool: + ... +``` + + +# Create custom Tests + +The test files are written in the same way as any other pytest test file. The only difference is that pytest-abra provides custom fixtures that make it easy to get the configuration by the provided .env files and to deal with URLS etc. + +# todo: add example \ No newline at end of file