##// END OF EJS Templates
Adding new tests for test_magic for win32.
Administrator -
Show More
@@ -60,7 +60,9 b' def doctest_hist_r():'
60 hist -n -r 2 # random
60 hist -n -r 2 # random
61 """
61 """
62
62
63
63 # This is skipped for now because getoutput doesn't find the ipython
64 # executable. See ticket https://bugs.launchpad.net/bugs/366334
65 @dec.skip_win32
64 def test_obj_del():
66 def test_obj_del():
65 """Test that object's __del__ methods are called on exit."""
67 """Test that object's __del__ methods are called on exit."""
66 test_dir = os.path.dirname(__file__)
68 test_dir = os.path.dirname(__file__)
@@ -159,6 +161,7 b' def doctest_run_ns2():'
159 tclass.py: deleting object: C-first_pass
161 tclass.py: deleting object: C-first_pass
160 """
162 """
161
163
164 @dec.skip_win32
162 def doctest_run_builtins():
165 def doctest_run_builtins():
163 """Check that %run doesn't damage __builtins__ via a doctest.
166 """Check that %run doesn't damage __builtins__ via a doctest.
164
167
@@ -206,6 +209,13 b' class TestMagicRun(object):'
206 def run_tmpfile(self):
209 def run_tmpfile(self):
207 _ip.magic('run %s' % self.tmpfile.name)
210 _ip.magic('run %s' % self.tmpfile.name)
208
211
212 # See https://bugs.launchpad.net/bugs/366353
213 @dec.skip_if_not_win32
214 def test_run_tempfile_path(self):
215 # self.run_tmpfile() # This is what triggers the error!
216 tt.assert_equals(True,False,"%run doesn't work with tempfile paths on win32.")
217
218 @dec.skip_win32
209 def test_builtins_id(self):
219 def test_builtins_id(self):
210 """Check that %run doesn't damage __builtins__ """
220 """Check that %run doesn't damage __builtins__ """
211
221
@@ -215,6 +225,7 b' class TestMagicRun(object):'
215 bid2 = id(_ip.user_ns['__builtins__'])
225 bid2 = id(_ip.user_ns['__builtins__'])
216 tt.assert_equals(bid1, bid2)
226 tt.assert_equals(bid1, bid2)
217
227
228 @dec.skip_win32
218 def test_builtins_type(self):
229 def test_builtins_type(self):
219 """Check that the type of __builtins__ doesn't change with %run.
230 """Check that the type of __builtins__ doesn't change with %run.
220
231
@@ -225,6 +236,7 b' class TestMagicRun(object):'
225 self.run_tmpfile()
236 self.run_tmpfile()
226 tt.assert_equals(type(_ip.user_ns['__builtins__']),type(sys))
237 tt.assert_equals(type(_ip.user_ns['__builtins__']),type(sys))
227
238
239 @dec.skip_win32
228 def test_prompts(self):
240 def test_prompts(self):
229 """Test that prompts correctly generate after %run"""
241 """Test that prompts correctly generate after %run"""
230 self.run_tmpfile()
242 self.run_tmpfile()
General Comments 0
You need to be logged in to leave comments. Login now