How to use the pgspecial.iocommands function in pgspecial

To help you get started, we’ve selected a few pgspecial 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 dbcli / pgspecial / tests / test_internal.py View on Github external
def test_plain_editor_commands_detected():
    assert not iocommands.editor_command('select * from foo')
    assert not iocommands.editor_command(r'\easy does it')

    assert iocommands.editor_command(r'\e') == r'\e'
    assert iocommands.editor_command(r'\e myfile.txt') == r'\e'
    assert iocommands.editor_command(r'select * from foo \e') == r'\e'

    assert iocommands.editor_command(r'  \e  ') == r'\e'
    assert iocommands.editor_command(r'select * from foo \e  ') == r'\e'
github dbcli / pgspecial / tests / test_internal.py View on Github external
def test_plain_editor_commands_detected():
    assert not iocommands.editor_command('select * from foo')
    assert not iocommands.editor_command(r'\easy does it')

    assert iocommands.editor_command(r'\e') == r'\e'
    assert iocommands.editor_command(r'\e myfile.txt') == r'\e'
    assert iocommands.editor_command(r'select * from foo \e') == r'\e'

    assert iocommands.editor_command(r'  \e  ') == r'\e'
    assert iocommands.editor_command(r'select * from foo \e  ') == r'\e'