Now pindent.py works with a "with" statement. pindent.py no longer produces
improper indentation. pindent.py now works with continued lines broken after
"class" or "def" keywords and with continuations at the start of line. Added
regression tests for pindent.py. Modernized pindent.py.
Now pindent.py works with a "with" statement. pindent.py no longer produces
improper indentation. pindent.py now works with continued lines broken after
"class" or "def" keywords and with continuations at the start of line. Added
regression tests for pindent.py. Modernized pindent.py.
changeset: 77827:c23b442b5d5e
user: Antoine Pitrou <solipsis@pitrou.net>
date: Thu Jun 28 01:20:26 2012 +0200
summary: Avoid using scrdir, it's broken.
changeset: 77826:f0e58e778215
user: Neil Schemenauer <nas@arctrix.com>
date: Wed Jun 27 15:58:37 2012 -0600
summary: Fix bug in test_tools that prevented building is separate directory.
Use 'srcdir' from sysconfig instead of 'projectbase' to build a
path to the Tools directory. 'projectbase' is the path of the build
directory, not the source directory.
importlib.abc.FileLoader.load_module()/get_filename() and
importlib.machinery.ExtensionFileLoader.load_module() have their
single argument be optional as the loader's constructor has all the
ncessary information.
This allows for the deprecation of
imp.load_source()/load_compile()/load_package().
Not that I haven't tested it to make sure it works, just that it
can run against an empty source file.
Initial patch by Popa.Claudiu.
Here we also add a test (which uses mock, which is why I didn't
check it in on 3.2).
This patch changes a few of the scripts to have __name__=='__main__'
clauses so that they are importable without running. Also fixes the
syntax errors revealed by the tests.
When people find bugs in scripts such as reindent.py, msgfmt.py or
pygettext.py, we have to try to reproduce the bug manually, apply a fix
and test manually again. The alternative is to only read the code and
trust that it works. This test file is a way to stop that
unsatisfactory state of things and write proper unit tests instead.