astropy/astropy — pull request #2512 by eteq (2014-05-17 18:15:41+00:00)
Title: Coerce pytest args to str to fix assertion error in pytest

This fixes a problem I encountered when running the tests with ``-t`` on an rst file. E.g., ``python setup.py test -t coordinates/index.rst`` That should run the doctests for just that file, but instead, it yields the cryptic traceback I've included at the bottom of this message. I traced the cause to a line deep in the bowels of pytest that does ``isinstance(arg, str)``, which fails for unicode arguments. So this PR just forces the arguments passed into pytest for setting plugins to be ``str``.

```
running build_scripts
Traceback (most recent call last):
File "", line 1, in
File "astropy/__init__.py", line 196, in test
skip_docs=skip_docs)
File "astropy/tests/helper.py", line 259, in run_tests
result = pytest.main(args=all_args, plugins=plugins)
File "_pytest.config", line 18, in main
File "_pytest.config", line 62, in _prepareconfig
File "_pytest.core", line 376, in __call__
File "_pytest.core", line 387, in _docall
File "_pytest.core", line 288, in execute
File "_pytest.helpconfig", line 25, in pytest_cmdline_parse
File "_pytest.core", line 288, in execute
File "_pytest.config", line 617, in pytest_cmdline_parse
File "_pytest.config", line 710, in parse
File "_pytest.config", line 686, in _preparse
File "_pytest.core", line 185, in consider_preparse
File "_pytest.core", line 195, in consider_pluginarg
File "_pytest.core", line 210, in import_plugin
AssertionError
```