<s> from __future__ import absolute_import <EOL> import unittest <EOL> import sys <EOL> import platform <EOL> import bokeh . util . testing as testing <EOL> class _CaptureString ( ) : <EOL> value = "<STR_LIT>" <EOL> def write ( self , string ) : <EOL> self . value += string <EOL> def flush ( self ) : <EOL> pass <EOL> def _CaptureStdOut ( ) : <EOL> out = _CaptureString ( ) <EOL> sys . stdout = out <EOL> return out <EOL> class TestPrintVersions ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> self . out = _CaptureStdOut ( ) <EOL> def test_print ( self ) : <EOL> import bokeh <EOL> testing . print_versions ( ) <EOL> sysinfo = [ platform . python_version ( ) , <EOL> platform . python_implementation ( ) , <EOL> platform . platform ( ) , <EOL> bokeh . __version__ ] <EOL> for info in sysinfo : <EOL> self . assertIn ( info , self . out . value ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
