Metadata-Version: 2.1
Name: pytest-multilog
Version: 1.0
Summary: Multi-process logs handling and other helpers for pytest
Home-page: https://github.com/dynod/pytest-multilog
Author: The dynod project
Maintainer: The dynod project
License: Mozilla Public License Version 2.0
Description: # pytest-multilog
        A pytest plugin to persist logs from parallel test processes (and other helpers)
        
        ## Usage
        To use the multilog feature, a test class just needs to inherit from the **`TestHelper`** class:
        
        ```python
        from pytest_multilog import TestHelper
        
        class TestCustom(TestHelper):
            def test_custom(self):
                # Custom test implementation
                ...
        ```
        
        The **`TestHelper`** class declares a **`logs`** fixture which will be automatically used by its children classes.
        
        ## Behavior and attributes
        
        ### Root folder
        The **`TestHelper`** class provider a **`root_folder`** property, matching with the **pytest** root folder.
        
        ### Output folder
        The **`TestHelper`** class provider a **`output_folder`** property, where all files will be written. It's set to **`output_folder / "out" / "tests"`**
        
        ### Test name
        Each test is associated to a name (provided in **`TestHelper.test_name`**), computed from the file name, the class name and the method name.
        
        E.g. for the snippet above, if stored in a **`test_custom.py`** file, the test name will be: **test_custom_TestCustom_test_custom**.
        
        ### Current worker
        In multi-process environment (**pytest** was invoked with **-n X** argument), the current worker name is provided in **`TestHelper.worker`** attribute.
        It's set to **"master"** in single-process environment.
        
        ### Test folder
        Test logs will be written in a **pytest.log** file, stored in each test folder (provided in **`TestHelper.test_folder`** attribute):
        * While the test is running, it's set to **`TestHelper.output_root / "__running__" / TestHelper.worker / TestHelper.test_name`**
        * Once the test is terminated, the folder is moved directly under the output root one.
        
        It means that during the test execution, it's possible to check which test is running on which worker 
        (easing troubleshooting situations where a given worker is blocked)
        
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Description-Content-Type: text/markdown
