##// END OF EJS Templates
minor test fixes for win32
MinRK -
Show More
@@ -134,5 +134,11 b' def test_hist_file_config():'
134 hm = HistoryManager(shell=get_ipython(), config=cfg)
134 hm = HistoryManager(shell=get_ipython(), config=cfg)
135 nt.assert_equals(hm.hist_file, cfg.HistoryManager.hist_file)
135 nt.assert_equals(hm.hist_file, cfg.HistoryManager.hist_file)
136 finally:
136 finally:
137 os.remove(tfile.name)
137 try:
138 os.remove(tfile.name)
139 except OSError:
140 # same catch as in testing.tools.TempFileMixin
141 # On Windows, even though we close the file, we still can't
142 # delete it. I have no clue why
143 pass
138
144
@@ -70,7 +70,16 b' def teardown():'
70 #-----------------------------------------------------------------------------
70 #-----------------------------------------------------------------------------
71 # Test functions
71 # Test functions
72 #-----------------------------------------------------------------------------
72 #-----------------------------------------------------------------------------
73 def win32_without_pywin32():
74 if sys.platform == 'win32':
75 try:
76 import pywin32
77 except ImportError:
78 return True
79 return False
80
73
81
82 @dec.skipif(win32_without_pywin32(), "Test requires pywin32 on Windows")
74 def test_startup_py():
83 def test_startup_py():
75 # create profile dir
84 # create profile dir
76 pd = ProfileDir.create_profile_dir_by_name(IP_TEST_DIR, 'test')
85 pd = ProfileDir.create_profile_dir_by_name(IP_TEST_DIR, 'test')
@@ -85,6 +94,7 b' def test_startup_py():'
85 tt.ipexec_validate(fname, '123', '',
94 tt.ipexec_validate(fname, '123', '',
86 options=['--ipython-dir', IP_TEST_DIR, '--profile', 'test'])
95 options=['--ipython-dir', IP_TEST_DIR, '--profile', 'test'])
87
96
97 @dec.skipif(win32_without_pywin32(), "Test requires pywin32 on Windows")
88 def test_startup_ipy():
98 def test_startup_ipy():
89 # create profile dir
99 # create profile dir
90 pd = ProfileDir.create_profile_dir_by_name(IP_TEST_DIR, 'test')
100 pd = ProfileDir.create_profile_dir_by_name(IP_TEST_DIR, 'test')
General Comments 0
You need to be logged in to leave comments. Login now