How to use the buku.ExtendedArgumentParser.program_info function in buku

To help you get started, we’ve selected a few buku examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jarun / Buku / tests / test_ExtendedArgumentParser.py View on Github external
def test_program_info(platform, file):
    """test method."""
    with mock.patch('buku.sys') as m_sys:
        import buku
        file = mock.Mock()
        if file is None:
            buku.ExtendedArgumentParser.program_info()
        else:
            buku.ExtendedArgumentParser.program_info(file)
        if platform == 'win32' and file == m_sys.stdout:
            assert len(m_sys.stderr.write.mock_calls) == 1
        else:
            assert len(file.write.mock_calls) == 1
github jarun / Buku / tests / test_ExtendedArgumentParser.py View on Github external
def test_program_info(platform, file):
    """test method."""
    with mock.patch('buku.sys') as m_sys:
        import buku
        file = mock.Mock()
        if file is None:
            buku.ExtendedArgumentParser.program_info()
        else:
            buku.ExtendedArgumentParser.program_info(file)
        if platform == 'win32' and file == m_sys.stdout:
            assert len(m_sys.stderr.write.mock_calls) == 1
        else:
            assert len(file.write.mock_calls) == 1