Skip to content

A pytest plugin that provides a test harness for testing posix-ish shell scripts.

License

Notifications You must be signed in to change notification settings

MarximusMaximus/pytest-shell-script-test-harness

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pytest-shell-script-test-harness

https://github.com/MarximusMaximus/pytest-shell-script-test-harness

by Marximus Maximus (https://marximus.com)

A pytest plugin for testing shell scripts. Provides a framework for writing tests for shell scripts as well as tracks coverage.

NOTE: Currently in Alpha phase.

Features

  • Use pytest to run tests for shell scripts.
  • Provides additional functions for use in shell script tests.
  • Tracks coverage for shell script code and shell script tests.
  • Works with most other pytest plugins*

Usage

  1. Install pytest-shell-script-test-harness via your favorite method, e.g.:
    • pip install pytest-shell-script-test-harness
    • poetry add --group dev pytest-shell-script-test-harness
  2. Write the python and shell script portions of your tests.
  3. Run pytest as you would normally.

Additional Info

* Tested against with the following as login shells and non-login shells, in every possible pairing:

  • bash
  • dash
  • zsh

* Tested with the following plugins so far:

Bug Reports / Feature Requests

Please submit bug reports and feature requests to: https://github.com/MarximusMaximus/pytest-shell-script-test-harness/issues

Development & Contribution

Pull Requests will be reviewed at: https://github.com/MarximusMaximus/pytest-shell-script-test-harness/pulls

Like My Work & Want To Support It?

About

A pytest plugin that provides a test harness for testing posix-ish shell scripts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published