From 0ef9e081d8b7e932b1a93662bac9853515698f58 2013-06-11 03:21:46 From: Paul Ivanov Date: 2013-06-11 03:21:46 Subject: [PATCH] more unique filename for test I actually had a filename named /tmp/foo and this test failed, because it was owned by a different user, hence writing to it (and deleting it) failed. Using /tmp/foo_iptest makes it a bit more unique, and a lot less likely to be on a given system. --- diff --git a/IPython/testing/plugin/dtexample.py b/IPython/testing/plugin/dtexample.py index 7ac81cd..d09ed2c 100644 --- a/IPython/testing/plugin/dtexample.py +++ b/IPython/testing/plugin/dtexample.py @@ -45,12 +45,12 @@ def ipfunc(): In [1]: !echo hello hello - In [2]: !echo hello > /tmp/foo + In [2]: !echo hello > /tmp/foo_iptest - In [3]: !cat /tmp/foo + In [3]: !cat /tmp/foo_iptest hello - In [4]: rm -f /tmp/foo + In [4]: rm -f /tmp/foo_iptest It's OK to use '_' for the last result, but do NOT try to use IPython's numbered history of _NN outputs, since those won't exist under the