##// END OF EJS Templates
test view.sync_imports
MinRK -
Show More
@@ -805,4 +805,30 b' class TestView(ClusterTestCase):'
805 view = self.client[-1]
805 view = self.client[-1]
806 tup = view.apply_sync(echoxy, point(1, 2))
806 tup = view.apply_sync(echoxy, point(1, 2))
807 self.assertEqual(tup, (2,1))
807 self.assertEqual(tup, (2,1))
808
809 def test_sync_imports(self):
810 view = self.client[-1]
811 with capture_output() as io:
812 with view.sync_imports():
813 import IPython
814 self.assertIn("IPython", io.stdout)
815
816 @interactive
817 def find_ipython():
818 return 'IPython' in globals()
819
820 assert view.apply_sync(find_ipython)
821
822 def test_sync_imports_quiet(self):
823 view = self.client[-1]
824 with capture_output() as io:
825 with view.sync_imports(quiet=True):
826 import IPython
827 self.assertEqual(io.stdout, '')
828
829 @interactive
830 def find_ipython():
831 return 'IPython' in globals()
832
833 assert view.apply_sync(find_ipython)
808
834
General Comments 0
You need to be logged in to leave comments. Login now