Git Product home page Git Product logo

Comments (5)

fperez avatar fperez commented on June 17, 2024

How old an ipython is this on? On 0.10.1-0.11 we've been ignoring sys.exit(False) calls precisely for this reason...

from nitime.

arokem avatar arokem commented on June 17, 2024

Python 2.7.2 |EPD 7.1-1 (32-bit)| (default, Jul 3 2011, 15:40:35)
Type "copyright", "credits" or "license" for more information.

IPython 0.12.dev -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.

In [1]: import nitime
ni
In [2]: nitime.test()
...............S................../Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7/site-packages/nitime/analysis/coherence.py:200: RuntimeWarning: invalid value encountered in divide
delay[i, j] = this_phase / (2 * np.pi * self.frequencies)
/Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7/site-packages/nitime/analysis/coherence.py:200: RuntimeWarning: divide by zero encountered in divide
delay[i, j] = this_phase / (2 * np.pi * self.frequencies)
/Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7/site-packages/nitime/algorithms/cohere.py:709: RuntimeWarning: divide by zero encountered in divide
((1 - ((np.abs(Rxr)) ** 2)) * (1 - ((np.abs(Rry)) ** 2))))
/Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7/site-packages/nitime/algorithms/cohere.py:709: RuntimeWarning: invalid value encountered in divide
((1 - ((np.abs(Rxr)) ** 2)) * (1 - ((np.abs(Rry)) * 2))))
./Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7/site-packages/nitime/analysis/coherence.py:524: RuntimeWarning: invalid value encountered in divide
return self.relative_phases / (2 * np.pi * self.frequencies)
.../Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7/site-packages/nitime/analysis/coherence.py:731: RuntimeWarning: invalid value encountered in divide
return self.relative_phases / (2 * np.pi * self.frequencies)
/Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7/site-packages/nitime/analysis/coherence.py:94: RuntimeWarning: In nitime.analysis, the provided input time-series is shorter than the requested NFFT + n_overlap. All coherence values will be set to 1.
warnings.warn(e_s, RuntimeWarning)
.................../Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7/site-packages/scipy/signal/filter_design.py:1087: RuntimeWarning: divide by zero encountered in divide
nat = (stopb
_2 - passb[0]_passb[1]) / (stopb* (passb[0]-passb[1]))
../Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7/site-packages/nitime/algorithms/wavelet.py:77: RuntimeWarning: divide by zero encountered in log
wf = (2 * np.exp(-(np.log(f) - np.log(f0)) ** 2 / (2 * sfl ** 2)) *
/Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7/site-packages/nitime/algorithms/wavelet.py:77: RuntimeWarning: invalid value encountered in log
wf = (2 * np.exp(-(np.log(f) - np.log(f0)) ** 2 / (2 * sfl ** 2)) *

...................................

Ran 94 tests in 131.714s

OK (SKIP=1)
An exception has occurred, use %tb to see the full traceback.

SystemExit: False

To exit: use 'exit', 'quit', or Ctrl-D.

In [3]: tb
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (46, 0))


SystemExit Traceback (most recent call last)
/Users/arokem/ in ()
----> 1 nitime.test()

/Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7/site-packages/nitime/testlib.pyc in test(doctests)
48 # Now nose can run

 49     try:

---> 50 TestProgram(argv=argv)#, exit=False)
51 finally:
52 np.set_printoptions(**opt_dict)

/Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7/site-packages/nose/core.pyc in init(self, module, defaultTest, argv, testRunner, testLoader, env, config, suite, exit, plugins, addplugins)
116 self, module=module, defaultTest=defaultTest,
117 argv=argv, testRunner=testRunner, testLoader=testLoader,
--> 118 **extra_args)
119
120 def makeConfig(self, env, plugins=None):

/Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7/unittest/main.pyc in init(self, module, defaultTest, argv, testRunner, testLoader, exit, verbosity, failfast, catchbreak, buffer)
93 self.progName = os.path.basename(argv[0])
94 self.parseArgs(argv)
---> 95 self.runTests()
96
97 def usageExit(self, msg=None):

/Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7/site-packages/nose/core.pyc in runTests(self)
198 self.success = result.wasSuccessful()
199 if self.exit:
--> 200 sys.exit(not self.success)
201 return self.success
202

SystemExit: False

from nitime.

fperez avatar fperez commented on June 17, 2024

Yes, but the traceback isn't printed by default, you need to request it with %tb. The idea is that in most cases, SystemExit isn't really an error for which you really want to see the tb, so we hide it.

The point of having that sys.exit happen is to set the proper exit code from the test process, so that any utilities (say a makefile) that run the test suite via

python -c "import nitime;nitime.test()"

can know if it succeeded or not.

from nitime.

arokem avatar arokem commented on June 17, 2024

Gotcha. So we can leave this as is and close this issue?

from nitime.

fperez avatar fperez commented on June 17, 2024

On Fri, Aug 19, 2011 at 9:18 AM, arokem
[email protected]
wrote:

Gotcha. So we can leave this as is and close this issue?

I think so, because those OS status codes are indeed valuable, even if
they cause a bit of noise in ipython (though as you see, much less in
current versions).

Cheers,

f

from nitime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.