Metadata-Version: 2.4
Name: pytest-artifact
Version: 0.2.0.post1
Summary: Pytest plugin for managing test artifacts
Project-URL: Repository, https://github.com/ketozhang/pytest-artifact
Project-URL: Documentation, https://github.com/ketozhang/pytest-artifact
Project-URL: Bug Tracker, https://github.com/ketozhang/pytest-artifact/issues
Author-email: "Keto D. Zhang" <keto.zhang@gmail.com>
Maintainer-email: "Keto D. Zhang" <keto.zhang@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: artifacts,plugin,pytest,testing
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.10
Requires-Dist: pytest>=6.2.0
Description-Content-Type: text/markdown

# pytest-artifact

[![PyPI version](https://img.shields.io/pypi/v/pytest-artifact.svg)](https://pypi.org/project/pytest-artifact)
[![Python versions](https://img.shields.io/pypi/pyversions/pytest-artifact.svg)](https://pypi.org/project/pytest-artifact)
[![See Build Status on GitHub Actions](https://github.com/ketozhang/pytest-artifact/actions/workflows/main.yml/badge.svg)](https://github.com/ketozhang/pytest-artifact/actions/workflows/main.yml)

Pytest plugin for managing test artifacts

## Installation

You can install "pytest-artifact" via [pip](https://pypi.org/project/pip/) from [PyPI](https://pypi.org/project):

```bash
pip install pytest-artifact
```

## Usage

```py
import time
import matplotlib.pyplot as plt

def test_benchmark(artifacts):
    times = range(1, 101, 10)
    elapsed = []
    for t in times:
        start_time = time.perf_counter()

        sleep(t)

        end_time = time.perf_counter()
        elapsed.append(end_time - start_time)

    plt.scatter(times, elapsed)
    plt.savefig(artifacts.dir / 'benchmark.png')
```

## Contributing

Contributions are very welcome.

## License

Distributed under the terms of the [MIT](https://opensource.org/licenses/MIT) license, "pytest-artifact" is free and open source software

## Issues

If you encounter any problems, please [file an issue](https://github.com/ketozhang/pytest-artifact/issues) along with a detailed description.
