File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,10 @@ def test_empty_session_option_returns_None(session):
132132
133133def test_show_option_unknown (session ):
134134 """Session.show_option raises UnknownOption for invalid option."""
135- with pytest .raises (exc .UnknownOption ):
135+ cmd_exception = exc .UnknownOption
136+ if has_gte_version ('3.0' ):
137+ cmd_exception = exc .InvalidOption
138+ with pytest .raises (cmd_exception ):
136139 session .show_option ('moooz' )
137140
138141
Original file line number Diff line number Diff line change @@ -213,7 +213,10 @@ def test_show_window_option_unknown(session):
213213 """Window.show_window_option raises UnknownOption for bad option key."""
214214 window = session .new_window (window_name = 'test_window' )
215215
216- with pytest .raises (exc .UnknownOption ):
216+ cmd_exception = exc .UnknownOption
217+ if has_gte_version ('3.0' ):
218+ cmd_exception = exc .InvalidOption
219+ with pytest .raises (cmd_exception ):
217220 window .show_window_option ('moooz' )
218221
219222
You can’t perform that action at this time.
0 commit comments