<s> import pytest <EOL> import sys <EOL> from bokeh . command . bootstrap import main <EOL> from bokeh import __version__ <EOL> is_python2 = sys . version_info [ <NUM_LIT:0> ] == <NUM_LIT:2> <EOL> def test_no_subcommand ( capsys ) : <EOL> with pytest . raises ( SystemExit ) : <EOL> main ( [ "<STR_LIT>" ] ) <EOL> out , err = capsys . readouterr ( ) <EOL> assert err == "<STR_LIT>" <EOL> assert out == "<STR_LIT>" <EOL> def _assert_version_output ( capsys ) : <EOL> out , err = capsys . readouterr ( ) <EOL> if is_python2 : <EOL> err_expected = ( "<STR_LIT>" % __version__ ) <EOL> out_expected = "<STR_LIT>" <EOL> else : <EOL> err_expected = "<STR_LIT>" <EOL> out_expected = ( "<STR_LIT>" % __version__ ) <EOL> assert err == err_expected <EOL> assert out == out_expected <EOL> def test_version ( capsys ) : <EOL> with pytest . raises ( SystemExit ) : <EOL> main ( [ "<STR_LIT>" , "<STR_LIT>" ] ) <EOL> _assert_version_output ( capsys ) <EOL> def test_version_short ( capsys ) : <EOL> with pytest . raises ( SystemExit ) : <EOL> main ( [ "<STR_LIT>" , "<STR_LIT>" ] ) <EOL> _assert_version_output ( capsys ) </s>
