defl/tests.old/test_clipboard.py

20 lines
420 B
Python
Raw Permalink Normal View History

2024-09-11 11:14:03 -04:00
#!/usr/bin/env python
import defl
from defl import cl, log
from defl.testing_ import Tester
tester = Tester(name=__file__)
@tester.add()
def testClipboard():
for i in ['dddddddd', 1234, -1, object(), '\n\n']:
defl.Clipboard().copy(i)
paste = defl.Clipboard().paste()
assert str(i) == paste, f"{i.encode('utf8')} != {paste.encode('utf8')}"
log.info(tester.run())
tester.exitWithStatus()