On 5 Feb 2016, at 16:39, Francis Poulin <fpoulin@uwaterloo.ca> wrote:
(firedrake)am-laptop24:software fpoulin$ /Users/fpoulin/software/firedrake/bin/ipython firedrake/src/firedrake/tests/test_0init.py --------------------------------------------------------------------------- Great news! I aliased python and ipython in path, started virtual env and the test for python works.
OK, good. I would recommend not using aliases in your shell (it's easy to forget about them and they don't carry around well).
The not so great news is that ipython still has problems, see below. I think this used to work before I upgraded python.
See below, I think this is not actually an issue with the installation.
This isn't the same problem as before as I am specifying the whole path, but the same thing happens of course even if I simply type ipython.
ValueError Traceback (most recent call last) /Users/fpoulin/software/firedrake/src/firedrake/tests/test_0init.py in <module>() 20 if __name__ == '__main__': 21 import os ---> 22 pytest.main(os.path.abspath(__file__))
/Users/fpoulin/software/firedrake/lib/python2.7/site-packages/_pytest/config.pyc in main(args, plugins) 36 try: 37 try: ---> 38 config = _prepareconfig(args, plugins) 39 except ConftestImportFailure as e: 40 tw = py.io.TerminalWriter(sys.stderr)
/Users/fpoulin/software/firedrake/lib/python2.7/site-packages/_pytest/config.pyc in _prepareconfig(args, plugins) 103 elif not isinstance(args, (tuple, list)): 104 if not isinstance(args, str): --> 105 raise ValueError("not a string or argument list: %r" % (args,)) 106 args = shlex.split(args) 107 config = get_config()
ValueError: not a string or argument list: u'/Users/fpoulin/software/firedrake/src/firedrake/tests/test_0init.py'
I too have this problem, I do not think it is an issue for actually using firedrake. The problem has occurred because, for whatever reason, the file path that pytest gets is of type "unicode" which is not an instance of "str". I recommend running the tests with the py.test binary: e.g. if you want to run a single test file: py.test path/to/test_file.py The ability to run the tests individually just using python is a "convenience" in case you can't retrain yourself to type py.test. Thanks, Lawrence