[yt-svn] commit/yt: 2 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Mon Nov 2 11:54:03 PST 2015


2 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/0c232cb115b2/
Changeset:   0c232cb115b2
Branch:      yt
User:        ngoldbaum
Date:        2015-10-31 15:01:37+00:00
Summary:     Provide nice error message when triggering nose issue 701
Affected #:  1 file

diff -r 9a49e5d6da9fc23bc7a2858bb5a304b9c4f5537b -r 0c232cb115b2649e169a44441610ac8444f0c48d yt/testing.py
--- a/yt/testing.py
+++ b/yt/testing.py
@@ -745,6 +745,20 @@
     initial_dir = os.getcwd()
     yt_file = os.path.abspath(yt.__file__)
     yt_dir = os.path.dirname(yt_file)
+    if os.path.samefile(os.path.dirname(yt_dir), initial_dir):
+        # Provide a nice error message to work around nose bug
+        # see https://github.com/nose-devs/nose/issues/701
+        raise RuntimeError(
+            """
+    The yt.run_nose function does not work correctly when invoked in
+    the same directory as the installed yt package. Try starting
+    a python session in a different directory before invoking yt.run_nose
+    again. Alternatively, you can also run the "nosetests" executable in
+    the current directory like so:
+
+        $ nosetests
+            """
+            )
     os.chdir(yt_dir)
     try:
         nose.run(argv=nose_argv)


https://bitbucket.org/yt_analysis/yt/commits/f264885c3fb4/
Changeset:   f264885c3fb4
Branch:      yt
User:        bwkeller
Date:        2015-11-02 19:53:50+00:00
Summary:     Merged in ngoldbaum/yt (pull request #1840)

Provide nice error message when triggering nose issue 701
Affected #:  1 file

diff -r 7318cb52f59066d6f1bcd8e09fc0757cfb6849a3 -r f264885c3fb49044ba653bf1b29e2eb46e99db24 yt/testing.py
--- a/yt/testing.py
+++ b/yt/testing.py
@@ -745,6 +745,20 @@
     initial_dir = os.getcwd()
     yt_file = os.path.abspath(yt.__file__)
     yt_dir = os.path.dirname(yt_file)
+    if os.path.samefile(os.path.dirname(yt_dir), initial_dir):
+        # Provide a nice error message to work around nose bug
+        # see https://github.com/nose-devs/nose/issues/701
+        raise RuntimeError(
+            """
+    The yt.run_nose function does not work correctly when invoked in
+    the same directory as the installed yt package. Try starting
+    a python session in a different directory before invoking yt.run_nose
+    again. Alternatively, you can also run the "nosetests" executable in
+    the current directory like so:
+
+        $ nosetests
+            """
+            )
     os.chdir(yt_dir)
     try:
         nose.run(argv=nose_argv)

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list