p≡p for Python
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
heck 89613b713e test: sync_test.py - add --debuglog -d 6 months ago
..
data/keys add disable_all_sync_channels() and test with extra identity 6 months ago
README.md Test: README.md - add link to more sync testing doc. 6 months ago
codec_doctest.py Mutli-threading support for native libs calling python code added 1 year ago
doctest_PYADPT-55.py Why not make all executable python scripts executable using: 1 year ago
miniimap.py clean code 2 years ago
minimail.py random timing for minimail 2 years ago
pyadpt-57.py Test for key_mistrusted() 1 year ago
pyadpt-58.py Test for export_secret_key() 1 year ago
pyadpt-81.py Mutli-threading support for native libs calling python code added 1 year ago
start_sync.py PYADPT-111: a little bit of testing 6 months ago
sync_handshake.py test: sync_handshake.py - add --debuglog -d option 6 months ago
sync_test.py test: sync_test.py - add --debuglog -d 6 months ago

README.md

= Tests in this directory =

more doc under: https://dev.pep.foundation/Engine/Testing%20p%e2%89%a1p%20Sync

$ HOME=$PWD python3 basic_doctest.py -v do some basic tests of p≡p

CAVEAT: set environment variable HOME to a test directory before executing
this test

$ python3 sync_test.py start two processes representing two devices and do a sync test

Once started sync_handshake.py is creating a trace of all sent messages in TestInbox. There's a file named Laptop or Phone, respectively, which is working as a marker; the modification timestamp of this file is showing the mails being considered as “already received”. If you delete the file and start i.e.

$ cd Phone $ rm ../TestInbox/Phone $ HOME=$PWD lldb python3 -- ../sync_handshake.py -e Phone

Then this side is doing a replay in the debugger. Using touch to set a different timestamp on the marker will only partly replay.

In order to work with IMAP you need to create a imap_settings.py file with the following variables:

IMAP_HOST = 'domain.ch' IMAP_PORT = '993' IMAP_USER = 'your_username' IMAP_PWD = 'password' IMAP_EMAIL = 'user@domain.ch'

= Hint =

installing termcolor and lxml will beautify the output