def test_open_docs():
 old_tab = webbrowser.open_new_tab
 try:
  webbrowser.open_new_tab = (lambda x: assert_true(('martinos' in x)))
  open_docs()
  open_docs('tutorials', 'dev')
  open_docs('examples', 'stable')
  assert_raises(ValueError, open_docs, 'foo')
  assert_raises(ValueError, open_docs, 'api', 'foo')
 finally:
  webbrowser.open_new_tab = old_tab

def test_open_docs ( ) : old_tab = webbrowser . open_new_tab try : webbrowser . open_new_tab = ( lambda x : assert_true ( ( 'martinos' in x ) ) ) open_docs ( ) open_docs ( 'tutorials' , 'dev' ) open_docs ( 'examples' , 'stable' ) assert_raises ( ValueError , open_docs , 'foo' ) assert_raises ( ValueError , open_docs , 'api' , 'foo' ) finally : webbrowser . open_new_tab = old_tab
test doc launching .