We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8661179 commit 35a1439Copy full SHA for 35a1439
nipype/interfaces/freesurfer/tests/test_utils.py
@@ -227,10 +227,13 @@ def test_surfshots():
227
yield assert_equal, fotos.cmdline, "tksurfer fsaverage lh pial -tcl other.tcl"
228
229
# Test that the interface crashes politely if graphics aren't enabled
230
- hold_display = os.environ["DISPLAY"]
231
- del os.environ["DISPLAY"]
232
- yield assert_raises, RuntimeError, fotos.run
233
- os.environ["DISPLAY"] = hold_display
234
-
+ try:
+ hold_display = os.environ["DISPLAY"]
+ del os.environ["DISPLAY"]
+ yield assert_raises, RuntimeError, fotos.run
+ os.environ["DISPLAY"] = hold_display
235
+ except KeyError:
236
+ pass
237
+
238
# Clean up our mess
239
clean_directory(cwd, oldwd)
0 commit comments