astropy/astropy — pull request #720 by astrofrog (2013-02-02 08:59:06+00:00)
Title: Explicitly list keyword arguments when calling test()

Explicitly list keywords when calling test(), otherwise affiliated packages will not be robust to additional keywords - they use **kwargs to capture any additional arguments, but this only works when listing the keyword arguments.

Before, in an affiliated package that doesn't yet list ``open_files`` as an argument (printing out ``cmd`` from ``tests/helper.py``):

```
('COMMAND:', 'import __builtin__; __builtin__._ASTROPY_TEST_ = True; import sedfitter, sys; sys.exit(sedfitter.test(None, None, None, None, False, None, False, False, False, False, False))')
WARNING: ConfigurationDefaultMissingWarning: Requested default configuration file sedfitter/sedfitter.cfg is not a file. Cannot install default profile. If you are importing from source, this is expected. [sedfitter]
ERROR: TypeError: test() takes at most 10 arguments (11 given) [unknown]
Traceback (most recent call last):
File "", line 1, in
TypeError: test() takes at most 10 arguments (11 given)
```

Now:

```
('COMMAND:', 'import __builtin__; __builtin__._ASTROPY_TEST_ = True; import sedfitter, sys; sys.exit(sedfitter.test(package=None, test_path=None, args=None, plugins=None, verbose=False, pastebin=None, remote_data=False, pep8=False, pdb=False, coverage=False, open_files=False))')
```

and all works fine.