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)
def test_to_primary(): text = "primary test" cb.to_primary(text) assert cb.read_primary() == text
def teardown_module(module): """Runs once at the very end.""" cb.to_primary(bak_primary) cb.to_clipboard(bak_clipboard)