bashtest


Namebashtest JSON
Version 0.0.7 PyPI version JSON
download
home_pagehttps://github.com/pahaz/bashtest
SummaryUNIX command-line tool for bash/shell utils unit testing
upload_time2016-08-26 23:04:24
maintainerNone
docs_urlNone
authorPahaz Blinov
requires_pythonNone
licenseMIT
keywords google spreadsheet api util helper
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            |CircleCI| |version|

|pyversions| |license|

**Author**: `Pahaz Blinov`_

**Repo**: https://github.com/pahaz/bashtest/

BashTest is a UNIX command-line tool for the testing bash/shell utilites.

This is a simplest way to write simple bash tests.

**requirements**: Python2 or Python3

**keywords**: bash unittest, unittesting, bash tesing, sh unit testing

Installation
============

`bashtest`_ is on PyPI, so simply run:

::

    pip install bashtest

or ::

    easy_install bashtest

to have it installed in your environment.

For installing from source, clone the
`repo <https://github.com/pahaz/bashtest>`_ and run::

    python setup.py install

If you don`t have **pip** you can `install it <https://pip.pypa.io/en/stable/installing/#installation>`_

Typical use case
================

You have a command line util or bash/sh script and you want to test it.

For example, we want to test **ls** util.

All of we need is to create text file with execution log.

**./test_ls.bashtest** ::

    $ ls ./testsuit/list-directory
    file1
    file2.txt
    file3.py
    file4.sh

Run this tests ::

    $ bashtest test_ls.bashtest
    1 items passed all tests:
       1 tests in test_ls.bashtest
    1 tests in 1 items.
    1 passed and 0 failed.
    Test passed.

Test README examples
====================

You have a some open source project like this. And of course, as in any good
open source project, you have examples. You can automatically check this
examples. Just add **bashtest README.rst** in your CI tests.

More examples
=============

You can finde some examples in this project. Please check **test_*.bashtest**
files

changelog
=========

** 0.0.7 **
 - fix! remove ugly and useless options
 - feat! Test README.rst `#4 <https://github.com/pahaz/bashtest/issues/4>`_
 - feat! find *.bashtest by default `#3 <https://github.com/pahaz/bashtest/issues/3>`_

** 0.0.6 **
 - fix! bad command escaping bug `#5 <https://github.com/pahaz/bashtest/issues/5>`_

HELP
----

::

   $ bashtest --help
   usage: bashtest [-h] [--exitcode] [-v] [-q] [--debug] [--version]
                   [file [file ...]]

   BashTest is a UNIX command-line tool for running text-based bash tests.

   positional arguments:
     file           Input file (by default uses *.bashtest)

   optional arguments:
     -h, --help     show this help message and exit
     --exitcode     Print exitcode after command end of output
     -v, --verbose  Verbose output mode
     -q, --quiet    Silent output mode
     --debug        Print the debug information
     --version      Print the version string


.. _Pahaz Blinov: https://github.com/pahaz/
.. _bashtest: https://pypi.python.org/pypi/bashtest
.. |CircleCI| image:: https://circleci.com/gh/pahaz/bashtest.svg?style=svg
   :target: https://circleci.com/gh/pahaz/bashtest
.. |DwnMonth| image:: https://img.shields.io/pypi/dm/bashtest.svg
.. |DwnWeek| image:: https://img.shields.io/pypi/dw/bashtest.svg
.. |DwnDay| image:: https://img.shields.io/pypi/dd/bashtest.svg
.. |pyversions| image:: https://img.shields.io/pypi/pyversions/bashtest.svg
.. |version| image:: https://img.shields.io/pypi/v/bashtest.svg
   :target: `bashtest`_
.. |license| image::  https://img.shields.io/pypi/l/bashtest.svg
   :target: https://github.com/pahaz/bashtest/blob/master/LICENSE
            

Raw data

            {
    "_id": null,
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "cheesecake_code_kwalitee_id": null,
    "keywords": "google spreadsheet api util helper",
    "upload_time": "2016-08-26 23:04:24",
    "author": "Pahaz Blinov",
    "home_page": "https://github.com/pahaz/bashtest",
    "github_user": "pahaz",
    "download_url": "https://pypi.python.org/packages/66/5d/98c238913ae0ce36163401deef66fd8408fc323c6f723652e0a32fed9406/bashtest-0.0.7.tar.gz",
    "platform": "unix,macos,windows",
    "version": "0.0.7",
    "cheesecake_documentation_id": null,
    "description": "|CircleCI| |version|\n\n|pyversions| |license|\n\n**Author**: `Pahaz Blinov`_\n\n**Repo**: https://github.com/pahaz/bashtest/\n\nBashTest is a UNIX command-line tool for the testing bash/shell utilites.\n\nThis is a simplest way to write simple bash tests.\n\n**requirements**: Python2 or Python3\n\n**keywords**: bash unittest, unittesting, bash tesing, sh unit testing\n\nInstallation\n============\n\n`bashtest`_ is on PyPI, so simply run:\n\n::\n\n    pip install bashtest\n\nor ::\n\n    easy_install bashtest\n\nto have it installed in your environment.\n\nFor installing from source, clone the\n`repo <https://github.com/pahaz/bashtest>`_ and run::\n\n    python setup.py install\n\nIf you don`t have **pip** you can `install it <https://pip.pypa.io/en/stable/installing/#installation>`_\n\nTypical use case\n================\n\nYou have a command line util or bash/sh script and you want to test it.\n\nFor example, we want to test **ls** util.\n\nAll of we need is to create text file with execution log.\n\n**./test_ls.bashtest** ::\n\n    $ ls ./testsuit/list-directory\n    file1\n    file2.txt\n    file3.py\n    file4.sh\n\nRun this tests ::\n\n    $ bashtest test_ls.bashtest\n    1 items passed all tests:\n       1 tests in test_ls.bashtest\n    1 tests in 1 items.\n    1 passed and 0 failed.\n    Test passed.\n\nTest README examples\n====================\n\nYou have a some open source project like this. And of course, as in any good\nopen source project, you have examples. You can automatically check this\nexamples. Just add **bashtest README.rst** in your CI tests.\n\nMore examples\n=============\n\nYou can finde some examples in this project. Please check **test_*.bashtest**\nfiles\n\nchangelog\n=========\n\n** 0.0.7 **\n - fix! remove ugly and useless options\n - feat! Test README.rst `#4 <https://github.com/pahaz/bashtest/issues/4>`_\n - feat! find *.bashtest by default `#3 <https://github.com/pahaz/bashtest/issues/3>`_\n\n** 0.0.6 **\n - fix! bad command escaping bug `#5 <https://github.com/pahaz/bashtest/issues/5>`_\n\nHELP\n----\n\n::\n\n   $ bashtest --help\n   usage: bashtest [-h] [--exitcode] [-v] [-q] [--debug] [--version]\n                   [file [file ...]]\n\n   BashTest is a UNIX command-line tool for running text-based bash tests.\n\n   positional arguments:\n     file           Input file (by default uses *.bashtest)\n\n   optional arguments:\n     -h, --help     show this help message and exit\n     --exitcode     Print exitcode after command end of output\n     -v, --verbose  Verbose output mode\n     -q, --quiet    Silent output mode\n     --debug        Print the debug information\n     --version      Print the version string\n\n\n.. _Pahaz Blinov: https://github.com/pahaz/\n.. _bashtest: https://pypi.python.org/pypi/bashtest\n.. |CircleCI| image:: https://circleci.com/gh/pahaz/bashtest.svg?style=svg\n   :target: https://circleci.com/gh/pahaz/bashtest\n.. |DwnMonth| image:: https://img.shields.io/pypi/dm/bashtest.svg\n.. |DwnWeek| image:: https://img.shields.io/pypi/dw/bashtest.svg\n.. |DwnDay| image:: https://img.shields.io/pypi/dd/bashtest.svg\n.. |pyversions| image:: https://img.shields.io/pypi/pyversions/bashtest.svg\n.. |version| image:: https://img.shields.io/pypi/v/bashtest.svg\n   :target: `bashtest`_\n.. |license| image::  https://img.shields.io/pypi/l/bashtest.svg\n   :target: https://github.com/pahaz/bashtest/blob/master/LICENSE",
    "lcname": "bashtest",
    "name": "bashtest",
    "github": true,
    "bugtrack_url": null,
    "license": "MIT",
    "travis_ci": false,
    "github_project": "bashtest",
    "summary": "UNIX command-line tool for bash/shell utils unit testing",
    "split_keywords": [
        "google",
        "spreadsheet",
        "api",
        "util",
        "helper"
    ],
    "author_email": "pahaz.blinov@gmail.com",
    "urls": [
        {
            "has_sig": false,
            "upload_time": "2016-08-26T23:04:24",
            "comment_text": "",
            "python_version": "source",
            "url": "https://pypi.python.org/packages/66/5d/98c238913ae0ce36163401deef66fd8408fc323c6f723652e0a32fed9406/bashtest-0.0.7.tar.gz",
            "md5_digest": "d3e9609b13ddc1e1d62200a5af686049",
            "downloads": 0,
            "filename": "bashtest-0.0.7.tar.gz",
            "packagetype": "sdist",
            "path": "66/5d/98c238913ae0ce36163401deef66fd8408fc323c6f723652e0a32fed9406/bashtest-0.0.7.tar.gz",
            "size": 6242
        }
    ],
    "cheesecake_installability_id": null,
    "coveralls": true
}
        
Elapsed time: 0.03749s