##// END OF EJS Templates
Add test that interactive warning is shown.
Matthias Bussonnier -
Show More
@@ -901,3 +901,20 b' def test_warning_suppression():'
901 ip.run_cell("warnings.warn('asdf')")
901 ip.run_cell("warnings.warn('asdf')")
902 finally:
902 finally:
903 ip.run_cell("del warnings")
903 ip.run_cell("del warnings")
904
905
906 def test_deprecation_warning():
907 ip.run_cell("""
908 import warnings
909 def wrn():
910 warnings.warn(
911 "I AM A WARNING",
912 DeprecationWarning
913 )
914 """)
915 try:
916 with tt.AssertPrints("I AM A WARNING", channel="stderr"):
917 ip.run_cell("wrn()")
918 finally:
919 ip.run_cell("del warnings")
920 ip.run_cell("del wrn")
General Comments 0
You need to be logged in to leave comments. Login now