Package: pythoscope
InstallationEasiest way to get Pythoscope is via setuptools:$ easy_install pythoscopeYou can also download a source package fromhttp://pythoscope.org/local–files/download/pythoscope-0.4.3.tar.gzor get a copy of a development branch usingbazaar:$ bzr branch lp:pythoscopeTo install the package from the source directory do:$ python setup.py installYou don’t need setuptools for this to work, a bare Python will do just fine.However, if youdohave setuptools installed, you may also consider running
the whole test suite of Pythoscope:$ python setup.py testUsageYou can use the tool through a singlepythoscopecommand. To prepare
your project for use with Pythoscope, type:$ pythoscope --init path/to/your/project/It’s only doing static analysis, and doesn’t import your modules or
execute your code in any way, so you’re perfectly safe to run it on
anything you want. After that, a directory named.pythoscopewill be
created in the current directory. To generate test stubs based on your
project, select files you want to generate tests for:$ pythoscope  path/to/your/project/specific/file.py  path/to/your/project/other/*.pyTest files will be saved to your test directory, if you have one, or
into a newtests/directory otherwise. Test cases are aggregated
into TestCase classes. Currently each production class and each
production function gets its own TestCase class.Some of the classes and functions are ignored by the generator - all
which name begins with an underscore, exception classes, and some
others.Generator itself is configurable to some extent, see:$ pythoscope --helpfor more information on available options.Editor IntegrationEmacsWe put out an elisp script that integrates Pythoscope into Emacs. The file is in the the misc/ directory of the source distribution. You can alsolook at the file on Launchpad. Usage and installation instructions are in the comments at the top of the file.VimThere is interest in Vim integration and someone is working on it but we have nothing for you right now.LeoThere was much discussion of Leo onthe mail list editor integration thread.LicenseAll Pythoscope source code is licensed under an MIT license (see LICENSE file).
All files under lib2to3/ are licensed under PSF license.Changelog0.4.3Pythoscope now ignores application and test modules it could not inspect (#487138#462849).Improved generation of assertions for functions with varargs and kwargs (#475414#475409).Pythoscope will no longer generate two test cases with the same name (#475504).Installation package now contains all essential files (#481238).Pythoscope now properly handles string exceptions thrown inside entry points (#522364).Entry points are now run with the current directory being the project root (#524352).0.4.2Removeddependency on fixture module.Fixed test generation bug related to function definitions with varargs (#440773).Dynamic inspector can nowhandle all types of exceptions(including string exceptions).Frequently Asked Questions document has been created, alsoavailable online.Addedsupport for Pythons 2.3through 2.6.New imports added by Pythoscope are now placed after existing ones, so they don’t cause a syntax error when __future__ imports were used (#373978).Fixed inspection bug related to classes deriving from namedtuple instances (#460715).Setuptools is no longer required for installation.0.4.1Greatly improvedinformation storage performance.Added Pythoscope module for Emacs to the misc/ directory in the source tree.Unittests can now be used as points of entry (#275059).Pythoscope now ignores source control files (#284568).Static inspection happens on –init, as it should be (#325928).Ported itertive pattern matcher for lib2to3 from Python trunk (#304541).Fixed test generation bug related to nested function arguments (#344220).Fixed point of entry cleanup bug (#324522).Fixed some more Windows-specific bugs (#348136).0.4Stoppedusing pickle for object serializationand implemented our own mechanism that carefully captures changing state of objects during dynamic inspection.Implementedpreserve objects identityblueprint.Fixed bug related to multiple generator calls (#295340).Made handling of special method names (like __init__ or __eq__) consistent with handling of normal method names.Madetest stubs more useful.0.3.2Made Pythoscopemore verbose.Addedsupport for user-defined exceptions.Fixed unicode handling bug (#284585).Improved performance of the internal information storage.0.3.1Added implementation of samefile function for Windows (#271882).Fixed wrong indentation bug (#271892).Made lib2to3.pgen2.parse.ParseError pickable (#271904).Addedsupport for Python generators.Fixed static inspection of functions having attributes with default values (#275459).0.3Fixed generate bug for test modules (#264449)..pythoscope became a directory.Introduced –init option for initializing .pythoscope/ directory.Added a notion of points of entry introducing dynamic analysis.Pythoscope can now generate assert_equal and assert_raises type of assertions.Implementedno more inspect command blueprint.Changed the default test directory from pythoscope-tests/ to tests/.Added a tutorial to the README file.0.2.2Fixed the inner classes bug (#260924).Collector appends new data to .pythoscope file instead of overwriting it.Test modules are being analyzed as well.Using lib2to3 for static code analysis instead of stdlib’s compiler module.Generator can append test cases to existing test modules. Preserves comments and original whitespace.Cheetah is no longer a dependency.Renamed ‘collect’ command to ‘inspect’.0.2.1Contains a packaging bug fix, which prevented users from using the tests
cases generator and running internal pythoscope tests.0.2First release, featuring static code analysis and generation of test
stubs.