[IPython-dev] correct test-suite

Thomas Spura tomspur@fedoraproject....
Tue Jul 27 14:27:26 CDT 2010


Am Mon, 26 Jul 2010 19:38:21 -0700
schrieb Fernando Perez <fperez.net@gmail.com>:

> On Mon, Jul 26, 2010 at 12:18 AM, Thomas Spura
> <tomspur@fedoraproject.org> wrote:
> > Here, they don't... That's why, I didn't look too closely to the
> > failing tests in my branches. I'll try to fix the failures in
> > current master on my side first, because it seems some other
> > dependencies are doing something wrong I guess...
> >
> 
> If you can't find it, show me the tracebacks and I may be able to help
> out.  We want the test suite to degrade gracefully by skipping if
> optional dependencies aren't met, not to fail.

Now there are some less failures than before:

$ /usr/bin/python /usr/lib/python2.6/site-packages/IPython/testing/iptest.py
IPython.core
IPython.extensions ......F.................................................................S......>f(1) ...F........F.F...E.
======================================================================
ERROR:
IPython.extensions.tests.test_pretty.TestPrettyInteractively.test_printers
----------------------------------------------------------------------
Traceback (most recent call last): File
"/usr/lib/python2.6/site-packages/nose/case.py", line 186, in runTest
self.test(*self.arg) File
"/usr/lib/python2.6/site-packages/IPython/testing/decorators.py", line
225, in skipper_func return f(*args, **kwargs) File
"/usr/lib/python2.6/site-packages/IPython/extensions/tests/test_pretty.py",
line 101, in test_printers tt.ipexec_validate(self.fname, ipy_out) File
"/usr/lib/python2.6/site-packages/IPython/testing/tools.py", line 250,
in ipexec_validate (fname, err)) ValueError: Running file
'/tmp/tmpEtePU6.ipy' produced error:
"---------------------------------------------------------------------------\nAttributeError
Traceback (most recent call last)\n\n/home/tom/bin/<ipython console> in
<module>()\n\nAttributeError: 'NoneType' object has no attribute
'for_type'"

======================================================================
FAIL: Doctest: IPython.core.magic.Magic.magic_reset_selective
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/usr/lib/python2.6/site-packages/IPython/testing/plugin/ipdoctest.py",
line 265, in runTest raise
self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for
IPython.core.magic.Magic.magic_reset_selective File
"/usr/lib/python2.6/site-packages/IPython/core/magic.py", line 1115, in
magic_reset_selective

----------------------------------------------------------------------
File "/usr/lib/python2.6/site-packages/IPython/core/magic.py", line
1132, in IPython.core.magic.Magic.magic_reset_selective Failed example:
    get_ipython().magic("who_ls ")
Expected:
    ['a', 'b', 'b1', 'b1m', 'b2m', 'b2s', 'b3m', 'b4m', 'c']
Got:
    ['Bunch', 'ESC_MAGIC', 'FakeModule', 'GetoptError', 'IPython',
'LSString', 'Macro', 'Magic', 'SList', 'StringIO', 'StringTypes',
'Struct', 'Term', 'TryNext', 'UsageError', 'a', 'abbrev_cwd',
'arg_split', 'b', 'b1m', 'b2m', 'b2s', 'b3m', 'b4m', 'bdb', 'c',
'clock', 'clock2', 'compress_dhist', 'debugger', 'enable_gui', 'error',
'file_read', 'get_py_filename', 'getopt', 'inspect', 'itpl',
'mpl_runner', 'nlprint', 'oinspect', 'on_off', 'os', 'page', 'pformat',
'printpl', 'profile', 'pstats', 're', 'set_term_title', 'shutil',
'sys', 'testdec', 'textwrap', 'time', 'types', 'warn']
----------------------------------------------------------------------
File "/usr/lib/python2.6/site-packages/IPython/core/magic.py", line
1137, in IPython.core.magic.Magic.magic_reset_selective Failed example:
get_ipython().magic("who_ls ") Expected: ['a', 'b', 'b1', 'b1m', 'b2s',
'c'] Got: ['Bunch', 'ESC_MAGIC', 'FakeModule', 'GetoptError',
'IPython', 'LSString', 'Macro', 'Magic', 'SList', 'StringIO',
'StringTypes', 'Struct', 'Term', 'TryNext', 'UsageError', 'a',
'abbrev_cwd', 'arg_split', 'b', 'b1m', 'b2s', 'b4m', 'bdb', 'c',
'clock', 'clock2', 'compress_dhist', 'debugger', 'enable_gui', 'error',
'file_read', 'get_py_filename', 'getopt', 'inspect', 'itpl',
'mpl_runner', 'nlprint', 'oinspect', 'on_off', 'os', 'page', 'pformat',
'printpl', 'profile', 'pstats', 're', 'set_term_title', 'shutil',
'sys', 'testdec', 'textwrap', 'time', 'types', 'warn']
----------------------------------------------------------------------
File "/usr/lib/python2.6/site-packages/IPython/core/magic.py", line
1142, in IPython.core.magic.Magic.magic_reset_selective Failed example:
get_ipython().magic("who_ls ") Expected: ['a', 'b', 'b1', 'b1m', 'b2s',
'c'] Got: ['Bunch', 'ESC_MAGIC', 'GetoptError', 'IPython', 'LSString',
'Macro', 'Magic', 'SList', 'StringIO', 'StringTypes', 'Struct', 'Term',
'TryNext', 'UsageError', 'a', 'arg_split', 'b', 'b1m', 'b2s', 'b4m',
'c', 'clock', 'clock2', 'enable_gui', 'error', 'get_py_filename',
'getopt', 'inspect', 'itpl', 'mpl_runner', 'nlprint', 'oinspect',
'on_off', 'os', 'page', 'pformat', 'printpl', 'profile', 'pstats',
're', 'set_term_title', 'shutil', 'sys', 'textwrap', 'time', 'types',
'warn']
----------------------------------------------------------------------
File "/usr/lib/python2.6/site-packages/IPython/core/magic.py", line
1147, in IPython.core.magic.Magic.magic_reset_selective Failed example:
get_ipython().magic("who_ls ") Expected: Out[8]:['a', 'b', 'b1', 'b1m',
'b2s'] Got: ['ESC_MAGIC', 'GetoptError', 'IPython', 'LSString',
'SList', 'StringIO', 'StringTypes', 'Term', 'TryNext', 'UsageError',
'a', 'arg_split', 'b', 'b1m', 'b2s', 'b4m', 'enable_gui', 'error',
'get_py_filename', 'getopt', 'itpl', 'mpl_runner', 'nlprint', 'on_off',
'os', 'page', 'pformat', 'printpl', 'profile', 'pstats', 're',
'set_term_title', 'shutil', 'sys', 'textwrap', 'time', 'types', 'warn']
----------------------------------------------------------------------
File "/usr/lib/python2.6/site-packages/IPython/core/magic.py", line
1152, in IPython.core.magic.Magic.magic_reset_selective Failed example:
get_ipython().magic("who_ls ") Expected: ['a'] Got: ['ESC_MAGIC',
'GetoptError', 'IPython', 'LSString', 'SList', 'StringIO',
'StringTypes', 'Term', 'TryNext', 'UsageError', 'a', 'arg_split',
'error', 'get_py_filename', 'getopt', 'itpl', 'mpl_runner', 'nlprint',
'on_off', 'os', 'page', 'pformat', 'printpl', 'profile', 'pstats',
're', 'set_term_title', 'shutil', 'sys', 'textwrap', 'time', 'types',
'warn']

>>  raise self.failureException(self.format_failure(<StringIO.StringIO
>> instance at 0x48941b8>.getvalue()))
    

======================================================================
FAIL: Check that multiline string literals don't expand as magic
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/usr/lib/python2.6/site-packages/IPython/testing/_paramtestpy2.py",
line 53, in run_parametric testgen.next() File
"/usr/lib/python2.6/site-packages/IPython/core/tests/test_prefilter.py",
line 59, in test_issue114 yield nt.assert_equals(ip.prefilter(raw),
raw) AssertionError: '"""\nget_ipython().magic("Exit ")\n"""' !=
'"""\nExit\n"""'
>>  raise self.failureException, \
          (None or '%r != %r' % ('"""\nget_ipython().magic("Exit
")\n"""', '"""\nExit\n"""')) 

======================================================================
FAIL: Test that object's __del__ methods are called on exit.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/nose/case.py", line 186, in
runTest self.test(*self.arg)
  File
"/usr/lib/python2.6/site-packages/IPython/testing/decorators.py", line
225, in skipper_func return f(*args, **kwargs) File
"/usr/lib/python2.6/site-packages/IPython/core/tests/test_run.py", line
155, in test_obj_del tt.ipexec_validate(self.fname, 'object A deleted')
File "/usr/lib/python2.6/site-packages/IPython/testing/tools.py", line
252, in ipexec_validate nt.assert_equals(out.strip(),
expected_out.strip()) AssertionError: '\x1b[?1034hobject A deleted' !=
'object A deleted'
>>  raise self.failureException, \
          (None or '%r != %r' % ('\x1b[?1034hobject A deleted', 'object
A deleted')) 

======================================================================
FAIL: IPython.core.tests.test_run.TestMagicRunSimple.test_tclass
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/nose/case.py", line 186, in
runTest self.test(*self.arg)
  File
"/usr/lib/python2.6/site-packages/IPython/testing/decorators.py", line
225, in skipper_func return f(*args, **kwargs) File
"/usr/lib/python2.6/site-packages/IPython/core/tests/test_run.py", line
169, in test_tclass tt.ipexec_validate(self.fname, out) File
"/usr/lib/python2.6/site-packages/IPython/testing/tools.py", line 252,
in ipexec_validate nt.assert_equals(out.strip(), expected_out.strip())
AssertionError: "\x1b[?1034hARGV 1-: ['C-first']\nARGV 1-:
['C-second']\ntclass.py: deleting object: C-first" != "ARGV 1-:
['C-first']\nARGV 1-: ['C-second']\ntclass.py: deleting object: C-first"
>>  raise self.failureException, \
          (None or '%r != %r' % ("\x1b[?1034hARGV 1-: ['C-first']\nARGV
1-: ['C-second']\ntclass.py: deleting object: C-first", "ARGV 1-:
['C-first']\nARGV 1-: ['C-second']\ntclass.py: deleting object:
C-first")) 

----------------------------------------------------------------------
Ran 104 tests in 1.916s

FAILED (SKIP=1, errors=1, failures=4)


But don't know, what is really expected here right now...

	Thomas


More information about the IPython-dev mailing list