##// END OF EJS Templates
Merge pull request #2231 from Carreau/ja...
Merge pull request #2231 from Carreau/ja Improve Image format validation and add html width,height This addresses the first two bullets of #2053 Validates first argument to constrain format to png, jpeg, Lets user specify width, height, or both and emits appropriate html I introduced a couple of class constants to minimize the number of times I saw 'jpeg' and 'png' and document the _ACCEPTABLE_FORMATS. I added one real jpeg image to the test directory and one zero-length gif file to survive the file not found error in super() Closes #2053 Add `assert_is_none`, `assert_is_not_none` to `nose.tools`

File last commit:

r4895:329e2362
r8116:19feb23c merge
Show More
test_autocall.py
45 lines | 971 B | text/x-python | PythonLexer
Fernando Perez
Moved unused autocall tests into a doctest that does get run now.
r2653 """These kinds of tests are less than ideal, but at least they run.
This was an old test that was being run interactively in the top-level tests/
directory, which we are removing. For now putting this here ensures at least
we do run the test, though ultimately this functionality should all be tested
with better-isolated tests that don't rely on the global instance in iptest.
"""
Thomas Kluyver
Fix various tests in IPython.core for Python 3.
r4895 from IPython.utils import py3compat
Fernando Perez
Moved unused autocall tests into a doctest that does get run now.
r2653
Thomas Kluyver
Fix various tests in IPython.core for Python 3.
r4895 @py3compat.doctest_refactor_print
Fernando Perez
Moved unused autocall tests into a doctest that does get run now.
r2653 def doctest_autocall():
"""
In [1]: def f1(a,b,c):
...: return a+b+c
...:
In [2]: def f2(a):
...: return a + a
...:
In [3]: ;f2 a b c
Out[3]: 'a b ca b c'
In [4]: assert _ == "a b ca b c"
In [5]: ,f1 a b c
Out[5]: 'abc'
In [6]: assert _ == 'abc'
In [7]: print _
abc
In [8]: /f1 1,2,3
Out[8]: 6
In [9]: assert _ == 6
In [10]: /f2 4
Out[10]: 8
In [11]: assert _ == 8
In [11]: del f1, f2
"""