Exemplo n.º 1
0
def test_execute_cmd():
    bak_primary = cb.read_primary()
    #
    text = 'arbitrary text'
    cb.to_primary(text)
    assert cb.read_primary() == text
    process.execute_cmd('xsel -pc')    # clear primary
    assert cb.read_primary() == ''
    #
    cb.to_primary(bak_primary)
Exemplo n.º 2
0
def test_execute_cmd():
    bak_primary = cb.read_primary()
    #
    text = 'arbitrary text'
    cb.to_primary(text)
    assert cb.read_primary() == text
    process.execute_cmd('xsel -pc')  # clear primary
    assert cb.read_primary() == ''
    #
    cb.to_primary(bak_primary)
Exemplo n.º 3
0
def test_clear_primary():
    test_to_primary()
    cb.clear_primary()
    assert cb.read_primary() == ''
Exemplo n.º 4
0
def setup_module(module):
    """Runs once at the beginning."""
    global bak_primary, bak_clipboard

    bak_primary = cb.read_primary()
    bak_clipboard = cb.read_clipboard()
Exemplo n.º 5
0
def test_clear_both_clipboards():
    test_text_to_clipboards()
    cb.clear_both_clipboards()
    assert cb.read_primary() == ''
    assert cb.read_clipboard() == ''
Exemplo n.º 6
0
def test_to_primary():
    text = "primary test"
    cb.to_primary(text)
    assert cb.read_primary() == text
Exemplo n.º 7
0
def test_text_to_clipboards():
    text = 'jabbapylib cb test'
    cb.text_to_clipboards(text)
    assert cb.read_primary() == text
    assert cb.read_clipboard() == text
Exemplo n.º 8
0
def test_clear_primary():
    test_to_primary()
    cb.clear_primary()
    assert cb.read_primary() == ''
Exemplo n.º 9
0
def setup_module(module):
    """Runs once at the beginning."""
    global bak_primary, bak_clipboard
    
    bak_primary = cb.read_primary()
    bak_clipboard = cb.read_clipboard()
Exemplo n.º 10
0
def test_clear_both_clipboards():
    test_text_to_clipboards()
    cb.clear_both_clipboards()
    assert cb.read_primary() == ''
    assert cb.read_clipboard() == ''
Exemplo n.º 11
0
def test_to_primary():
    text = "primary test"
    cb.to_primary(text)
    assert cb.read_primary() == text
Exemplo n.º 12
0
def test_text_to_clipboards():
    text = 'jabbapylib cb test'
    cb.text_to_clipboards(text)
    assert cb.read_primary() == text
    assert cb.read_clipboard() == text