From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../python/cram/cram-0.7.dist-info/DESCRIPTION.rst | 227 +++++++++++++++++++ .../python/cram/cram-0.7.dist-info/METADATA | 250 +++++++++++++++++++++ third_party/python/cram/cram-0.7.dist-info/RECORD | 16 ++ third_party/python/cram/cram-0.7.dist-info/WHEEL | 6 + .../python/cram/cram-0.7.dist-info/metadata.json | 1 + 5 files changed, 500 insertions(+) create mode 100644 third_party/python/cram/cram-0.7.dist-info/DESCRIPTION.rst create mode 100644 third_party/python/cram/cram-0.7.dist-info/METADATA create mode 100644 third_party/python/cram/cram-0.7.dist-info/RECORD create mode 100644 third_party/python/cram/cram-0.7.dist-info/WHEEL create mode 100644 third_party/python/cram/cram-0.7.dist-info/metadata.json (limited to 'third_party/python/cram/cram-0.7.dist-info') diff --git a/third_party/python/cram/cram-0.7.dist-info/DESCRIPTION.rst b/third_party/python/cram/cram-0.7.dist-info/DESCRIPTION.rst new file mode 100644 index 0000000000..0a6577392c --- /dev/null +++ b/third_party/python/cram/cram-0.7.dist-info/DESCRIPTION.rst @@ -0,0 +1,227 @@ +====================== + Cram: It's test time +====================== + +Cram is a functional testing framework for command line applications. +Cram tests look like snippets of interactive shell sessions. Cram runs +each command and compares the command output in the test with the +command's actual output. + +Here's a snippet from `Cram's own test suite`_:: + + The $PYTHON environment variable should be set when running this test + from Python. + + $ [ -n "$PYTHON" ] || PYTHON="`which python`" + $ [ -n "$PYTHONPATH" ] || PYTHONPATH="$TESTDIR/.." && export PYTHONPATH + $ if [ -n "$COVERAGE" ]; then + > coverage erase + > alias cram="`which coverage` run --branch -a $TESTDIR/../scripts/cram" + > else + > alias cram="$PYTHON $TESTDIR/../scripts/cram" + > fi + $ command -v md5 > /dev/null || alias md5=md5sum + + Usage: + + $ cram -h + [Uu]sage: cram \[OPTIONS\] TESTS\.\.\. (re) + + [Oo]ptions: (re) + -h, --help show this help message and exit + -V, --version show version information and exit + -q, --quiet don't print diffs + -v, --verbose show filenames and test status + -i, --interactive interactively merge changed test output + -d, --debug write script output directly to the terminal + -y, --yes answer yes to all questions + -n, --no answer no to all questions + -E, --preserve-env don't reset common environment variables + --keep-tmpdir keep temporary directories + --shell=PATH shell to use for running tests (default: /bin/sh) + --shell-opts=OPTS arguments to invoke shell with + --indent=NUM number of spaces to use for indentation (default: 2) + --xunit-file=PATH path to write xUnit XML output + +The format in a nutshell: + +* Cram tests use the ``.t`` file extension. + +* Lines beginning with two spaces, a dollar sign, and a space are run + in the shell. + +* Lines beginning with two spaces, a greater than sign, and a space + allow multi-line commands. + +* All other lines beginning with two spaces are considered command + output. + +* Output lines ending with a space and the keyword ``(re)`` are + matched as `Perl-compatible regular expressions`_. + +* Lines ending with a space and the keyword ``(glob)`` are matched + with a glob-like syntax. The only special characters supported are + ``*`` and ``?``. Both characters can be escaped using ``\``, and the + backslash can be escaped itself. + +* Output lines ending with either of the above keywords are always + first matched literally with actual command output. + +* Lines ending with a space and the keyword ``(no-eol)`` will match + actual output that doesn't end in a newline. + +* Actual output lines containing unprintable characters are escaped + and suffixed with a space and the keyword ``(esc)``. Lines matching + unprintable output must also contain the keyword. + +* Anything else is a comment. + +.. _Cram's own test suite: https://bitbucket.org/brodie/cram/src/default/tests/cram.t +.. _Perl-compatible regular expressions: https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions + + +Download +-------- + +* `cram-0.7.tar.gz`_ (32 KB, requires Python 2.4-2.7 or Python 3.1 or newer) + +.. _cram-0.7.tar.gz: https://bitheap.org/cram/cram-0.7.tar.gz + + +Installation +------------ + +Install Cram using make:: + + $ wget https://bitheap.org/cram/cram-0.7.tar.gz + $ tar zxvf cram-0.7.tar.gz + $ cd cram-0.7 + $ make install + + +Usage +----- + +Cram will print a dot for each passing test. If a test fails, a +`unified context diff`_ is printed showing the test's expected output +and the actual output. Skipped tests (empty tests and tests that exit +with return code ``80``) are marked with ``s`` instead of a dot. + +For example, if we run Cram on `its own example tests`_:: + + .s.! + --- examples/fail.t + +++ examples/fail.t.err + @@ -3,21 +3,22 @@ + $ echo 1 + 1 + $ echo 1 + - 2 + + 1 + $ echo 1 + 1 + + Invalid regex: + + $ echo 1 + - +++ (re) + + 1 + + Offset regular expression: + + $ printf 'foo\nbar\nbaz\n\n1\nA\n@\n' + foo + + bar + baz + + \d (re) + [A-Z] (re) + - # + + @ + s. + # Ran 6 tests, 2 skipped, 1 failed. + +Cram will also write the test with its actual output to +``examples/fail.t.err``, allowing you to use other diff tools. This +file is automatically removed the next time the test passes. + +When you're first writing a test, you might just write the commands +and run the test to see what happens. If you run Cram with ``-i`` or +``--interactive``, you'll be prompted to merge the actual output back +into the test. This makes it easy to quickly prototype new tests. + +You can specify a default set of options by creating a ``.cramrc`` +file. For example:: + + [cram] + verbose = True + indent = 4 + +Is the same as invoking Cram with ``--verbose`` and ``--indent=4``. + +To change what configuration file Cram loads, you can set the +``CRAMRC`` environment variable. You can also specify command line +options in the ``CRAM`` environment variable. + +Note that the following environment variables are reset before tests +are run: + +* ``TMPDIR``, ``TEMP``, and ``TMP`` are set to the test runner's + ``tmp`` directory. + +* ``LANG``, ``LC_ALL``, and ``LANGUAGE`` are set to ``C``. + +* ``TZ`` is set to ``GMT``. + +* ``COLUMNS`` is set to ``80``. (Note: When using ``--shell=zsh``, + this cannot be reset. It will reflect the actual terminal's width.) + +* ``CDPATH`` and ``GREP_OPTIONS`` are set to an empty string. + +Cram also provides the following environment variables to tests: + +* ``CRAMTMP``, set to the test runner's temporary directory. + +* ``TESTDIR``, set to the directory containing the test file. + +* ``TESTFILE``, set to the basename of the current test file. + +* ``TESTSHELL``, set to the value specified by ``--shell``. + +Also note that care should be taken with commands that close the test +shell's ``stdin``. For example, if you're trying to invoke ``ssh`` in +a test, try adding the ``-n`` option to prevent it from closing +``stdin``. Similarly, if you invoke a daemon process that inherits +``stdout`` and fails to close it, it may cause Cram to hang while +waiting for the test shell's ``stdout`` to be fully closed. + +.. _unified context diff: https://en.wikipedia.org/wiki/Diff#Unified_format +.. _its own example tests: https://bitbucket.org/brodie/cram/src/default/examples/ + + +Development +----------- + +Download the official development repository using Mercurial_:: + + hg clone https://bitbucket.org/brodie/cram + +Or Git_:: + + git clone https://github.com/brodie/cram.git + +Test Cram using Cram:: + + pip install -r requirements.txt + make test + +Visit Bitbucket_ or GitHub_ if you'd like to fork the project, watch +for new changes, or report issues. + +.. _Mercurial: http://mercurial.selenic.com/ +.. _Git: http://git-scm.com/ +.. _coverage.py: http://nedbatchelder.com/code/coverage/ +.. _Bitbucket: https://bitbucket.org/brodie/cram +.. _GitHub: https://github.com/brodie/cram + + diff --git a/third_party/python/cram/cram-0.7.dist-info/METADATA b/third_party/python/cram/cram-0.7.dist-info/METADATA new file mode 100644 index 0000000000..0edb62d168 --- /dev/null +++ b/third_party/python/cram/cram-0.7.dist-info/METADATA @@ -0,0 +1,250 @@ +Metadata-Version: 2.0 +Name: cram +Version: 0.7 +Summary: A simple testing framework for command line applications +Home-page: https://bitheap.org/cram/ +Author: Brodie Rao +Author-email: brodie@bitheap.org +License: GNU GPLv2 or any later version +Download-URL: https://bitheap.org/cram/cram-0.7.tar.gz +Keywords: automatic functional test framework +Platform: UNKNOWN +Classifier: Development Status :: 5 - Production/Stable +Classifier: Environment :: Console +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: GNU General Public License (GPL) +Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+) +Classifier: Natural Language :: English +Classifier: Operating System :: OS Independent +Classifier: Programming Language :: Python :: 2 +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Unix Shell +Classifier: Topic :: Software Development :: Testing + +====================== + Cram: It's test time +====================== + +Cram is a functional testing framework for command line applications. +Cram tests look like snippets of interactive shell sessions. Cram runs +each command and compares the command output in the test with the +command's actual output. + +Here's a snippet from `Cram's own test suite`_:: + + The $PYTHON environment variable should be set when running this test + from Python. + + $ [ -n "$PYTHON" ] || PYTHON="`which python`" + $ [ -n "$PYTHONPATH" ] || PYTHONPATH="$TESTDIR/.." && export PYTHONPATH + $ if [ -n "$COVERAGE" ]; then + > coverage erase + > alias cram="`which coverage` run --branch -a $TESTDIR/../scripts/cram" + > else + > alias cram="$PYTHON $TESTDIR/../scripts/cram" + > fi + $ command -v md5 > /dev/null || alias md5=md5sum + + Usage: + + $ cram -h + [Uu]sage: cram \[OPTIONS\] TESTS\.\.\. (re) + + [Oo]ptions: (re) + -h, --help show this help message and exit + -V, --version show version information and exit + -q, --quiet don't print diffs + -v, --verbose show filenames and test status + -i, --interactive interactively merge changed test output + -d, --debug write script output directly to the terminal + -y, --yes answer yes to all questions + -n, --no answer no to all questions + -E, --preserve-env don't reset common environment variables + --keep-tmpdir keep temporary directories + --shell=PATH shell to use for running tests (default: /bin/sh) + --shell-opts=OPTS arguments to invoke shell with + --indent=NUM number of spaces to use for indentation (default: 2) + --xunit-file=PATH path to write xUnit XML output + +The format in a nutshell: + +* Cram tests use the ``.t`` file extension. + +* Lines beginning with two spaces, a dollar sign, and a space are run + in the shell. + +* Lines beginning with two spaces, a greater than sign, and a space + allow multi-line commands. + +* All other lines beginning with two spaces are considered command + output. + +* Output lines ending with a space and the keyword ``(re)`` are + matched as `Perl-compatible regular expressions`_. + +* Lines ending with a space and the keyword ``(glob)`` are matched + with a glob-like syntax. The only special characters supported are + ``*`` and ``?``. Both characters can be escaped using ``\``, and the + backslash can be escaped itself. + +* Output lines ending with either of the above keywords are always + first matched literally with actual command output. + +* Lines ending with a space and the keyword ``(no-eol)`` will match + actual output that doesn't end in a newline. + +* Actual output lines containing unprintable characters are escaped + and suffixed with a space and the keyword ``(esc)``. Lines matching + unprintable output must also contain the keyword. + +* Anything else is a comment. + +.. _Cram's own test suite: https://bitbucket.org/brodie/cram/src/default/tests/cram.t +.. _Perl-compatible regular expressions: https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions + + +Download +-------- + +* `cram-0.7.tar.gz`_ (32 KB, requires Python 2.4-2.7 or Python 3.1 or newer) + +.. _cram-0.7.tar.gz: https://bitheap.org/cram/cram-0.7.tar.gz + + +Installation +------------ + +Install Cram using make:: + + $ wget https://bitheap.org/cram/cram-0.7.tar.gz + $ tar zxvf cram-0.7.tar.gz + $ cd cram-0.7 + $ make install + + +Usage +----- + +Cram will print a dot for each passing test. If a test fails, a +`unified context diff`_ is printed showing the test's expected output +and the actual output. Skipped tests (empty tests and tests that exit +with return code ``80``) are marked with ``s`` instead of a dot. + +For example, if we run Cram on `its own example tests`_:: + + .s.! + --- examples/fail.t + +++ examples/fail.t.err + @@ -3,21 +3,22 @@ + $ echo 1 + 1 + $ echo 1 + - 2 + + 1 + $ echo 1 + 1 + + Invalid regex: + + $ echo 1 + - +++ (re) + + 1 + + Offset regular expression: + + $ printf 'foo\nbar\nbaz\n\n1\nA\n@\n' + foo + + bar + baz + + \d (re) + [A-Z] (re) + - # + + @ + s. + # Ran 6 tests, 2 skipped, 1 failed. + +Cram will also write the test with its actual output to +``examples/fail.t.err``, allowing you to use other diff tools. This +file is automatically removed the next time the test passes. + +When you're first writing a test, you might just write the commands +and run the test to see what happens. If you run Cram with ``-i`` or +``--interactive``, you'll be prompted to merge the actual output back +into the test. This makes it easy to quickly prototype new tests. + +You can specify a default set of options by creating a ``.cramrc`` +file. For example:: + + [cram] + verbose = True + indent = 4 + +Is the same as invoking Cram with ``--verbose`` and ``--indent=4``. + +To change what configuration file Cram loads, you can set the +``CRAMRC`` environment variable. You can also specify command line +options in the ``CRAM`` environment variable. + +Note that the following environment variables are reset before tests +are run: + +* ``TMPDIR``, ``TEMP``, and ``TMP`` are set to the test runner's + ``tmp`` directory. + +* ``LANG``, ``LC_ALL``, and ``LANGUAGE`` are set to ``C``. + +* ``TZ`` is set to ``GMT``. + +* ``COLUMNS`` is set to ``80``. (Note: When using ``--shell=zsh``, + this cannot be reset. It will reflect the actual terminal's width.) + +* ``CDPATH`` and ``GREP_OPTIONS`` are set to an empty string. + +Cram also provides the following environment variables to tests: + +* ``CRAMTMP``, set to the test runner's temporary directory. + +* ``TESTDIR``, set to the directory containing the test file. + +* ``TESTFILE``, set to the basename of the current test file. + +* ``TESTSHELL``, set to the value specified by ``--shell``. + +Also note that care should be taken with commands that close the test +shell's ``stdin``. For example, if you're trying to invoke ``ssh`` in +a test, try adding the ``-n`` option to prevent it from closing +``stdin``. Similarly, if you invoke a daemon process that inherits +``stdout`` and fails to close it, it may cause Cram to hang while +waiting for the test shell's ``stdout`` to be fully closed. + +.. _unified context diff: https://en.wikipedia.org/wiki/Diff#Unified_format +.. _its own example tests: https://bitbucket.org/brodie/cram/src/default/examples/ + + +Development +----------- + +Download the official development repository using Mercurial_:: + + hg clone https://bitbucket.org/brodie/cram + +Or Git_:: + + git clone https://github.com/brodie/cram.git + +Test Cram using Cram:: + + pip install -r requirements.txt + make test + +Visit Bitbucket_ or GitHub_ if you'd like to fork the project, watch +for new changes, or report issues. + +.. _Mercurial: http://mercurial.selenic.com/ +.. _Git: http://git-scm.com/ +.. _coverage.py: http://nedbatchelder.com/code/coverage/ +.. _Bitbucket: https://bitbucket.org/brodie/cram +.. _GitHub: https://github.com/brodie/cram + + diff --git a/third_party/python/cram/cram-0.7.dist-info/RECORD b/third_party/python/cram/cram-0.7.dist-info/RECORD new file mode 100644 index 0000000000..8c2ef4ae3f --- /dev/null +++ b/third_party/python/cram/cram-0.7.dist-info/RECORD @@ -0,0 +1,16 @@ +cram/__init__.py,sha256=80M3WLqeS6MAACoIZW89KZR4bOmFm7UcpoRPF6S-8jc,172 +cram/__main__.py,sha256=AUlczSWsDtiA6srk4dsmdsz8cZXb1QXMdPkobAR-Ex0,152 +cram/_cli.py,sha256=aIJE2BY0djuOqgtCHe9IVUIl7Vvvk-awsksdmMd1RNc,4345 +cram/_diff.py,sha256=pXLlKb1UgQX17ayJpPQsGoMHW7bKLcACe9KEZlnMkx0,5630 +cram/_encoding.py,sha256=PSPdcjenMvC0wabbPhWPkCxeUcohcQ6o3Rk58AC97Uo,2990 +cram/_main.py,sha256=5gwaBNSyKCq9bwkRLKqNXcsB5Okf0sfxDpousd51CO4,7728 +cram/_process.py,sha256=2JV6sRl_9p3DYu1IYN5_D-isln9vAh5ua6bAxAy8ytA,1805 +cram/_run.py,sha256=X5fOy7TKxMdBcis0JczYZkNUoQdJ5wUqlDCM2sRJDm0,2292 +cram/_test.py,sha256=9QYuf3DRuLs9O1QVP3MfoJlISBRfnC5ONhCL4uXGYG8,7904 +cram/_xunit.py,sha256=KUAUokY3HhkgPYp0IjSl2m7KvztYdbwW7p1aqdaUJgA,6247 +cram-0.7.data/scripts/cram,sha256=S3wCw9Ks2J4dtVftWZ8DU0eNtpb1ekf8Bz73Di3PvUs,112 +cram-0.7.dist-info/DESCRIPTION.rst,sha256=ejwfPio_dRLrZ2PhWnsGbLW6lPyiDTjUAejg5MPG-kg,7080 +cram-0.7.dist-info/METADATA,sha256=ExruW_6HNwqu-mVqvcCSUtund4CHxt5hb3019a3jLeo,8018 +cram-0.7.dist-info/RECORD,, +cram-0.7.dist-info/WHEEL,sha256=o2k-Qa-RMNIJmUdIc7KU6VWR_ErNRbWNlxDIpl7lm34,110 +cram-0.7.dist-info/metadata.json,sha256=cRTULRj1eXU8xWOtqLK8DMhu0vWJELulW_PI8O4ytPU,1063 diff --git a/third_party/python/cram/cram-0.7.dist-info/WHEEL b/third_party/python/cram/cram-0.7.dist-info/WHEEL new file mode 100644 index 0000000000..8b6dd1b5a8 --- /dev/null +++ b/third_party/python/cram/cram-0.7.dist-info/WHEEL @@ -0,0 +1,6 @@ +Wheel-Version: 1.0 +Generator: bdist_wheel (0.29.0) +Root-Is-Purelib: true +Tag: py2-none-any +Tag: py3-none-any + diff --git a/third_party/python/cram/cram-0.7.dist-info/metadata.json b/third_party/python/cram/cram-0.7.dist-info/metadata.json new file mode 100644 index 0000000000..f2156d9e67 --- /dev/null +++ b/third_party/python/cram/cram-0.7.dist-info/metadata.json @@ -0,0 +1 @@ +{"classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License (GPL)", "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Programming Language :: Unix Shell", "Topic :: Software Development :: Testing"], "download_url": "https://bitheap.org/cram/cram-0.7.tar.gz", "extensions": {"python.details": {"contacts": [{"email": "brodie@bitheap.org", "name": "Brodie Rao", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}, "project_urls": {"Home": "https://bitheap.org/cram/"}}}, "generator": "bdist_wheel (0.29.0)", "keywords": ["automatic", "functional", "test", "framework"], "license": "GNU GPLv2 or any later version", "metadata_version": "2.0", "name": "cram", "summary": "A simple testing framework for command line applications", "version": "0.7"} \ No newline at end of file -- cgit v1.2.3