tap.py-2.2/ 0000755 0000765 0000024 00000000000 13224315237 012662 5 ustar matt staff 0000000 0000000 tap.py-2.2/AUTHORS 0000644 0000765 0000024 00000000305 12770642017 013734 0 ustar matt staff 0000000 0000000 tappy was originally created by Matt Layman.
Contributors
------------
* Chris Clarke
* Marc Abramowitz
* Mark E. Hamilton
* Matt Layman
* Michael F. Lamb (http://datagrok.org)
* Nicolas Caniart
tap.py-2.2/docs/ 0000755 0000765 0000024 00000000000 13224315237 013612 5 ustar matt staff 0000000 0000000 tap.py-2.2/docs/.contributing.rst.swp 0000644 0000765 0000024 00000030000 13224311656 017733 0 ustar matt staff 0000000 0000000 b0VIM 8.0 QZYr matt zion ~matt/projects/tappy/docs/contributing.rst utf-8
3210 #"! U tp , ad
L , V U Q K J i -
j
\
1
n N M B 7 6 L H 3. 3. Make sure your change works against master! (Bonus points for unit tests.) 2. Please try to conform with any conventions seen in the code for consistency. 1. Code should follow PEP 8 style. Please run it through ``pep8`` to check. ---------- Guidelines you should be ready to develop. and the test suite passes, If you've executed those commands The commands above show how to get a tappy clone configured. $ pytest $ # Edit some files and run the tests. $ pipenv shell $ pipenv install --dev --ignore-pipfile $ cd tappy $ git clone git@github.com:python-tap/tappy.git .. code-block:: console After installing Pipenv: for more details. See the `Pipenv install instructions `_ The following instructions assume that Pipenv is installed. to manage development. tappy uses Pipenv ----- Setup when you're ready. `submit a Pull Request `_ Fork tappy on `GitHub `_ and ----- How contribute, please submit an issue on GitHub so that we can fix it! tappy should be easy to contribute to. If anything is unclear about how to ============ Contributing tap.py-2.2/docs/_static/ 0000755 0000765 0000024 00000000000 13224315237 015240 5 ustar matt staff 0000000 0000000 tap.py-2.2/docs/_static/.keep 0000644 0000765 0000024 00000000000 12514255661 016160 0 ustar matt staff 0000000 0000000 tap.py-2.2/docs/alternatives.rst 0000644 0000765 0000024 00000003335 12654531741 017057 0 ustar matt staff 0000000 0000000 Alternatives
============
tappy is not the only project that can produce TAP output for Python.
While tappy is a capable TAP producer and consumer,
other projects might be a better fit for you.
The following comparison lists some other Python TAP tools
and lists some of the biggest differences compared to tappy.
pycotap
-------
pycotap is a good tool for when you want TAP output,
but you don't want extra dependencies.
pycotap is a zero dependency TAP producer.
It is so small that you could even embed it into your project.
`Check out the project homepage
`_.
catapult
--------
catapult is a TAP producer.
catapult is also capable of producing TAP-Y and TAP-J
which are YAML and JSON test streams
that are inspired by TAP.
`You can find the catapult source on GitHub
`_.
pytap13
-------
pytap13 is a TAP consumer for TAP version 13.
It parses a TAP stream
and produces test instances that can be inspected.
`pytap13's homepage is on Bitbucket
`_.
bayeux
------
bayeux is a TAP producer
that is designed to work with unittest and unittest2.
`bayeux is on GitLab.
`_.
taptaptap
---------
taptaptap is a TAP producer with a procedural style
similar to Perl.
It also includes a ``TapWriter`` class as a TAP producer.
`Visit the taptaptap homepage
`_.
unittest-tap-reporting
----------------------
unittest-tap-reporting is another zero dependency TAP producer.
`Check it out on GitHub
`_.
If there are other relevant projects,
please post an issue on GitHub
so this comparison page can be updated accordingly.
tap.py-2.2/docs/conf.py 0000644 0000765 0000024 00000020201 13224301143 015073 0 ustar matt staff 0000000 0000000 # -*- coding: utf-8 -*-
#
# tappy documentation build configuration file, created by
# sphinx-quickstart on Tue Mar 11 20:21:22 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys
import os
sys.path.append(os.path.abspath('..'))
from tap import __version__
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
]
# autodoc settings
autodoc_member_order = 'bysource'
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'tappy'
copyright = u'2018, Matt Layman and contributors'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = __version__
# The full version, including alpha/beta/rc tags.
release = __version__
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# " v documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#html_extra_path = []
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'tappydoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'tappy.tex', u'tappy Documentation',
u'Matt Layman and contributors', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('tappy.1', 'tappy', u'a tap consumer for python',
[], 1)
]
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'tappy', u'tappy Documentation',
u'Matt Layman and contributors', 'tappy', 'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False
tap.py-2.2/docs/consumers.rst 0000644 0000765 0000024 00000006767 12654531741 016410 0 ustar matt staff 0000000 0000000 TAP Consumers
=============
tappy Tool
----------
The ``tappy`` command line tool is a `TAP consumer
`_.
The tool accepts TAP files or directories containing TAP files
and provides a standard Python ``unittest`` style summary report.
Check out ``tappy -h`` for the complete list of options.
You can also use the tool's shorter alias of ``tap``.
.. code-block:: console
$ tappy *.tap
................F..................................
======================================================================
FAIL:
- The parser extracts a bail out line.
----------------------------------------------------------------------
----------------------------------------------------------------------
Ran 51 tests in 0.002s
FAILED (failures=1)
TAP Stream
~~~~~~~~~~
``tappy`` can read a TAP stream directly STDIN.
This permits any TAP producer to pipe its results to ``tappy``
without generating intermediate output files.
``tappy`` will read from STDIN
when no arguments are provided
or when a dash character is the only argument.
Here is an example of ``nosetests`` piping to ``tappy``:
.. code-block:: console
$ nosetests --with-tap --tap-stream 2>&1 | tappy
......................................................................
...............................................
----------------------------------------------------------------------
Ran 117 tests in 0.003s
OK
In this example,
``nosetests`` puts the TAP stream on STDERR
so it must be redirected to STDOUT
because the Unix pipe expects input on STDOUT.
``tappy`` can use redirected input
from a shell.
.. code-block:: console
$ tappy < TestAdapter.tap
........
----------------------------------------------------------------------
Ran 8 tests in 0.000s
OK
This final example shows ``tappy`` consuming TAP
from Perl's test tool, ``prove``.
The example includes the optional dash character.
.. code-block:: console
$ prove t/array.t -v | tappy -
............
----------------------------------------------------------------------
Ran 12 tests in 0.001s
OK
API
---
In addition to a command line interface, tappy enables programmatic access to
TAP files for users to create their own TAP consumers. This access comes in
two forms:
1. A ``Loader`` class which provides a ``load`` method to load a set of TAP
files into a ``unittest.TestSuite``. The ``Loader`` can receive files or
directories.
.. code-block:: pycon
>>> loader = Loader()
>>> suite = loader.load(['foo.tap', 'bar.tap', 'baz.tap'])
2. A ``Parser`` class to provide a lower level interface. The ``Parser`` can
parse a file via ``parse_file`` and return parsed lines that categorize the
file contents.
.. code-block:: pycon
>>> parser = Parser()
>>> for line in parser.parse_file('foo.tap'):
... # Do whatever you want with the processed line.
... pass
The API specifics are listed below.
.. autoclass:: tap.loader.Loader
:members:
.. autoclass:: tap.parser.Parser
:members:
Line Categories
~~~~~~~~~~~~~~~
The parser returns ``Line`` instances. Each line contains different properties
depending on its category.
.. autoclass:: tap.line.Result
:members:
.. autoclass:: tap.line.Plan
:members:
.. autoclass:: tap.line.Diagnostic
:members:
.. autoclass:: tap.line.Bail
:members:
.. autoclass:: tap.line.Version
:members:
.. autoclass:: tap.line.Unknown
:members:
tap.py-2.2/docs/contributing.rst 0000644 0000765 0000024 00000002264 13224311631 017051 0 ustar matt staff 0000000 0000000 Contributing
============
tappy should be easy to contribute to. If anything is unclear about how to
contribute, please submit an issue on GitHub so that we can fix it!
How
-----
Fork tappy on `GitHub `_ and
`submit a Pull Request `_
when you're ready.
Setup
-----
tappy uses Pipenv
to manage development.
The following instructions assume that Pipenv is installed.
See the `Pipenv install instructions `_
for more details.
After installing Pipenv:
.. code-block:: console
$ git clone git@github.com:python-tap/tappy.git
$ cd tappy
$ pipenv install --dev --ignore-pipfile
$ pipenv shell
$ # Edit some files and run the tests.
$ pytest
The commands above show how to get a tappy clone configured.
If you've executed those commands
and the test suite passes,
you should be ready to develop.
Guidelines
----------
1. Code should follow PEP 8 style. Please run it through ``pep8`` to check.
2. Please try to conform with any conventions seen in the code for consistency.
3. Make sure your change works against master! (Bonus points for unit tests.)
tap.py-2.2/docs/highlighter.rst 0000644 0000765 0000024 00000001157 12747173460 016657 0 ustar matt staff 0000000 0000000 TAP Syntax Highlighter for Pygments
===================================
`Pygments `_ contains an extension for syntax
highlighting of TAP files. Any project that uses Pygments, like
`Sphinx `_, can take advantage of this feature.
This highlighter was initially implemented in tappy.
Since the highlighter was merged into the upstream Pygments project,
tappy is no longer a requirement to get TAP syntax highlighting.
Below is an example usage for Sphinx.
.. code-block:: rst
.. code-block:: tap
1..2
ok 1 - A passing test.
not ok 2 - A failing test.
tap.py-2.2/docs/images/ 0000755 0000765 0000024 00000000000 13224315237 015057 5 ustar matt staff 0000000 0000000 tap.py-2.2/docs/images/python-tap.png 0000644 0000765 0000024 00000063664 12747173460 017720 0 ustar matt staff 0000000 0000000 PNG
IHDR