Пример #1
0
def test_clear_clipboard():
    test_to_clipboard()
    cb.clear_clipboard()
    assert cb.read_clipboard() == ''
Пример #2
0
def test_clear_both_clipboards():
    test_text_to_clipboards()
    cb.clear_both_clipboards()
    assert cb.read_primary() == ''
    assert cb.read_clipboard() == ''
Пример #3
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()
Пример #4
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
Пример #5
0
def test_to_clipboard():
    text = "clipboard test"
    cb.to_clipboard(text)
    assert cb.read_clipboard() == text
Пример #6
0
def test_clear_clipboard():
    test_to_clipboard()
    cb.clear_clipboard()
    assert cb.read_clipboard() == ''
    
Пример #7
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()
Пример #8
0
def test_clear_both_clipboards():
    test_text_to_clipboards()
    cb.clear_both_clipboards()
    assert cb.read_primary() == ''
    assert cb.read_clipboard() == ''
Пример #9
0
def test_to_clipboard():
    text = "clipboard test"
    cb.to_clipboard(text)
    assert cb.read_clipboard() == text
Пример #10
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