Permalink
Browse files

Work in progress on automated man page generation

  • Loading branch information...
1 parent 159594a commit ee4188501a9194de1c1c558c3523819ee52d6f9d jpellerin committed Apr 27, 2009
Showing with 1,229 additions and 72 deletions.
  1. +40 −37 CHANGELOG
  2. +4 −30 TODO
  3. +7 −1 doc/Makefile
  4. +2 −2 doc/conf.py
  5. +24 −0 doc/man.rst
  6. +24 −0 doc/manbuilder.py
  7. +1,124 −0 doc/manpage.py
  8. +1 −1 doc/usage.rst
  9. +3 −1 nose/config.py
View
@@ -36,19 +36,22 @@
AgilityNerd for the patch (#211).
- Fixed bug in list of valid names for package-level fixtures. Thanks to
Philip Jenvey for the patch (#237).
-
+- Updated man page generation using hacked up manpage writer from
+ docutils sandbox. Thanks grubert@users.sourceforge.net for the
+ original module.
+
0.10.4
- nose is now compatible with python 2.6.
-
+
0.10.3
- Fixed bug in nosetests setup command that caused an exception to be raised
if run with options. Thanks to Philip Jenvey for the bug report (#191).
- Raised score of coverage plugin to 200, so that it will execute before
default-score plugins, and so be able to catch more import-time code. Thanks
to Ned Batchelder for the bug report and patch (#190).
-
+
0.10.2
- nose now runs under jython (jython svn trunk only at this time). Thanks to
@@ -75,7 +78,7 @@
- Updated documentation about building as rpm (#127).
- Updated config to make including executable files the default on
IronPython as well as on Windows. Thanks to sanxiyn for the bug
- report and patch (#183).
+ report and patch (#183).
- Fixed a python 2.3 incompatibility in errorclass_failure.rst
(#173). Thanks to Philip Jenvey for the bug report and patch.
- Classes with metaclasses can now be collected as tests (#153).
@@ -246,7 +249,7 @@
- Fixed a bug in the doctests plugin that caused an error when multiple
exclude arguments were specified. Thanks to mbeachy for the bug report and
patch.
-
+
0.9.2
- Added nosetests setuptools command. Now you can run python setup.py
@@ -258,74 +261,74 @@
- Added nose.twistedtools, contributed by Antoine Pitrou. This module adds
@deferred decorator that makes it simple to write deferred tests, with or
without timeouts.
-- Added monkeypatch to doctests that keeps doctest from stepping on coverage
- when the two plugins are used together. Thanks to David Avraamides for the
+- Added monkeypatch to doctests that keeps doctest from stepping on coverage
+ when the two plugins are used together. Thanks to David Avraamides for the
bug report.
- Added isolation plugin. Use this plugin to automatically restore sys.modules
- after each test module or package. Thanks to Michal Kwiatkowski for the
+ after each test module or package. Thanks to Michal Kwiatkowski for the
feature request.
-- Fixed bug where -vvvv turned off verbose logging instead of making it even
+- Fixed bug where -vvvv turned off verbose logging instead of making it even
more verbose. Thanks to Ian Bicking for the bug report.
-- Fixed bug where assert inspection would fail when the trailing """ of a
- docstring was one of the inspected lines. Thanks to cito at online dot de
+- Fixed bug where assert inspection would fail when the trailing """ of a
+ docstring was one of the inspected lines. Thanks to cito at online dot de
for the bug report.
- Updated attrib plugin to allow selection of test methods by attributes of
the test case class. Thanks to Jason Hildebrand for the patch.
-- Improved compatibility with python 2.2. Thanks to Chad Whitacre for the
+- Improved compatibility with python 2.2. Thanks to Chad Whitacre for the
patch.
- Fixed bug in handling of options from setup.cfg. Thanks to Kumar McMillan for
the patch.
- Fixed bug in generator methods, where a generator method using an inline
funciton would result in an AttributeError. Thanks to Antoine Pitrou for the
bug report.
-- Updated coverage plugin to ignore lines tagged with #pragma: no cover,
- matching the behavior of coverage.py on the command line. Thanks to Bill
+- Updated coverage plugin to ignore lines tagged with #pragma: no cover,
+ matching the behavior of coverage.py on the command line. Thanks to Bill
Zingler for the bug report.
-- Added a man page for nosetests. Thanks to Gustavo Noronha Silva for the
+- Added a man page for nosetests. Thanks to Gustavo Noronha Silva for the
request and providing an example.
0.9.1
-- New function nose.runmodule() finds and runs tests only in a
- single module, which defaults to __main__ (like unittest.main() or
+- New function nose.runmodule() finds and runs tests only in a
+ single module, which defaults to __main__ (like unittest.main() or
doctest.runmodule()). Thanks Greg Wilson for the suggestion.
- Multiple -w (--where) arguments can now be used in one command line,
to find and run tests in multiple locations. Thanks Titus Brown for
the suggestion.
-- Multiple --include and --exclude arguments are now accepted in one command
+- Multiple --include and --exclude arguments are now accepted in one command
line. Thanks Michal Kwiatkowski for the feature request.
- Coverage will now include modules not imported by any test when
using the new --cover-inclusive switch. Thanks James Casbon for the
patch.
-- module:TestClass test selections now properly select all tests in the test
+- module:TestClass test selections now properly select all tests in the test
class.
- startTest and stopTest are now called in plugins at the beginning and end of
- test suites, including test modules, as well as individual tests. Thanks
+ test suites, including test modules, as well as individual tests. Thanks
Michal Kwiatkowski for the suggestion.
-- Fix bug in test selection when run as ``python setup.py test``: 'test' was
- passing through and being used as the test name selection. Thanks Kumar
+- Fix bug in test selection when run as ``python setup.py test``: 'test' was
+ passing through and being used as the test name selection. Thanks Kumar
McMillan for the bug report.
- Fix bug in handling of -x/--stop option where the test run would stop on
skipped or deprecated tests. Thanks Kumar McMillan for the bug report.
- Fix bug in loading tests from projects with layouts that place modules in
/lib or /src dirs and tests in a parallel /tests dir.
-- Fix bug in python version detection. Thanks Kevin Dangoor for the bug report
+- Fix bug in python version detection. Thanks Kevin Dangoor for the bug report
and fix.
-- Fix log message in selector that could raise IndexError. Thanks Kumar
+- Fix log message in selector that could raise IndexError. Thanks Kumar
McMillan for the bug report and patch.
- Fix bug in handling doctest extension arguments specified in environment and
on command line. Thanks Ian Bicking for the bug report.
- Fix bug in running fixtures (setup/teardown) that are not functions, and
report a better error message when a fixture is not callable. Thanks Ian
Bicking for the bug report.
-
+
0.9.0
- More unit tests and better test coverage. Numerous bugfixes deriving from
same.
- Make --exe option do what it says, and turn it on by default on
Windows. Add --noexe option so windows users can turn if off.Thanks
- richard at artsalliancemedia dot com for the bug reports.
+ richard at artsalliancemedia dot com for the bug reports.
- Handle a working directory that happens to be in the middle of a package
more gracefully. Thanks Max Ischenko for the bug report and test case.
- Fix bugs in test name comparison when a test module is specified whose name
@@ -336,12 +339,12 @@
0.9.0b2
-- Allow --debug to set any logger to DEBUG. Thanks to casbon at gmail dot com for
- the patch.
+- Allow --debug to set any logger to DEBUG. Thanks to casbon at gmail dot com
+ for the patch.
- Fix doctest help, which was missing notes about the environment variables
that it accepts. Thanks to Kumar McMillan for the patch.
- Restore sys.stdout after run() in nose.core. Thanks to Titus Brown for the
- bug report.
+ bug report.
- Correct handling of trailing comma in attrib plugin args. Thanks Titus Brown
for the patch.
@@ -353,7 +356,7 @@
module shadowed a builtin, or other object in sys.modules, without a
__file__ attribute. Thanks to casbon at gmail dot com for the bug report.
- Fix bug in nose.tools decorators that would cause decorated tests to appear
- with incorrect names in result output.
+ with incorrect names in result output.
0.9.0a2
@@ -377,7 +380,7 @@
tests. Doctest and coverage are now plugins.
- Add builtin plugins for profiling with hotshot, selecting tests by
attribute (contributed by Mika Eloranta), and warning of missed tests
- specified on command line.
+ specified on command line.
- Change command line test selection syntax to match unittest. Thanks to Titus
Brown for the suggestion.
- Option to drop into pdb on error or failure.
@@ -424,7 +427,7 @@
sys.path for the duration of the run, not just while importing the module.
- Add id() method to all callable test classes, for greater unittest
compatibility.
-
+
0.8.6
- Fix bug with coverage output when sys.modules contains entries without
@@ -481,19 +484,19 @@
- Add doctest support
- Add optional code coverage support, using Ned Batchelder's coverage.py;
activate with --coverage switch or NOSE_COVERAGE environment variable
-- More informative error message on import error
+- More informative error message on import error
- Fix bug where module setup could be called twice and teardown skipped
for certain setup method names.
- main() returns success value, does not exit. run_exit() added to support
old behavior; nosetests script now calls nose.run_exit()
-
+
0.7.5
- Fix bus error on exit
- Discover tests inside of non-TestCase classes that match testMatch
- Reorganize selftest: now selftest tests the output of a full nose run
- Add test_with_setup.py contributed by Kumar McMillan
-
+
0.7.2
- Refactor and correct bugs in discovery and test loading
@@ -504,7 +507,7 @@
- Bugfix release: test files in root of working directory were not being
stripped of file extension before import.
-
+
0.7
- Change license to LGPL
@@ -520,7 +523,7 @@
- Add optional py.test-like assert introspection. Thanks to Kevin Dangoor
for the suggestion.
- Improvements to selftest
-
+
0.5.1
- Increased compatibility with python 2.3 (and maybe earlier)
View
@@ -1,31 +1,5 @@
-FEATURES
-
-* rename Failure and split into subclasses for Import and other, and
- make it optionally include the name of the file being considered so
- that Failure test logs can be more informative
-
-* loader
- - support module.callable in addition to module:callable names
-
-
-BUGS
-
-
-CHORES
-
-* clean up all scripts
-
-TESTS NEEDED
-
- plugin examples
- - more!
-
- deprecated at module/module setup
- error at module/module setup
- plugin api -- comprehensive integration test that runs a suite with a plugin
- that tracks calls and ensures that all calls are called with proper
- arguments
-
- coverage/doctest -- need tests for coverage/doctest interaction
-
+* man builder using rst2man manpage write
+* register w/sphinx via extension
+* add man section to makefile, makes man.rst, copies from .build/man
+ to ../nosetests.1
View
@@ -11,7 +11,7 @@ PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d .build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
-.PHONY: help clean html web pickle htmlhelp latex changes linkcheck
+.PHONY: help clean html web pickle htmlhelp latex changes linkcheck man
help:
@echo "Please use \`make <target>' where <target> is one of"
@@ -73,3 +73,9 @@ linkcheck:
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in .build/linkcheck/output.txt."
+
+man:
+ mkdir -p .build/man ./build/doctrees
+ $(SPHINXBUILD) -b manpage $(ALLSPHINXOPTS) .build/man man.rst
+ @echo
+ @echo "Generated man page is in .build/man"
View
@@ -30,8 +30,8 @@
# 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', 'sphinx.ext.intersphinx', 'docstring',
- 'nose.sphinx.pluginopts']
+extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx',
+ 'nose.sphinx.pluginopts', 'manbuilder']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['.templates']
View
@@ -0,0 +1,24 @@
+===========
+ nosetests
+===========
+
+------------------------
+nicer testing for python
+------------------------
+
+:Author: jpellerin+nose@gmail.com
+:Date: 2009-04-23
+:Copyright: LGPL
+:Version: 0.11
+:Manual section: 1
+:Manual group: User Commands
+
+SYNOPSIS
+========
+
+ nosetests [options] [names]
+
+DESCRIPTION
+===========
+
+.. autohelp ::
View
@@ -0,0 +1,24 @@
+from manpage import Writer
+from sphinx.builders.text import TextBuilder
+
+
+class ManBuilder(TextBuilder):
+ name = 'manpage'
+ format = 'man'
+ out_suffix = '.man'
+
+ def prepare_writing(self, docnames):
+ self.writer = ManpageWriter(self)
+
+
+class ManpageWriter(Writer):
+ def __init__(self, builder):
+ self.builder = builder
+ Writer.__init__(self)
+
+
+def setup(app):
+ app.add_builder(ManBuilder)
+
+
+
Oops, something went wrong.

0 comments on commit ee41885

Please sign in to comment.