chore/increase offline tests coverage - #33
Conversation
86af228 to
a7800c5
Compare
|
I think Edit: Edit2: I think you need to break the second commit in more parts. It's very unclear what is dead code being removed and what is changing |
|
testdata/expected/results-offline.csv was already kind of big and you've 4x it, into 12k lines (1.3MB). Any way to break it into smaller files? If not in this MR, at least a plan on how we could achieve that |
tales-aparecida
left a comment
There was a problem hiding this comment.
Too many changes in a single commit
I have considered that. |
a7800c5 to
b693997
Compare
Broke into separate commits for each change. |
Much better, thanks! But the two refactor commits are still a bit confusing as to what is just being extracted/moved into a helper, and what is changing more dramatically. Do you think you can split them a bit more? |
Just to be sure. • b07cdb9 — refactor: split mail exporter for offline testing |
b693997 to
680379d
Compare
Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
Replace repeated dbcursor None-checks with a shared helper. Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
Drop dead get_by_link/dupof/update_author/parse_link paths that no callers use anymore. Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
Use injectable _web_now so offline tests can freeze web page timestamps. Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
Route report timestamps through _mail_now/_mail_days_delta so offline tests can freeze the mail clock. Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
Split RegExportMailReport.compile into listed/lastreport/prepare_reports/ prepare/publish helpers with behavior unchanged. Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
Thread interactive flag through prepare/publish, add fixed message-id and offline lastreport source, and expose dumpall_mail. Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
Separate page-building from page-writing so offline tests can assert web output without touching disk. Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
Gather regression/event data in prepare and move all page writing into publish, keeping current output. Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
Extract _events_gmtime_offset with a now-relative offline window and expose dumpall_web for offline dumps. Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
Record mail and web exporter dumps in results-offline.csv and add a delete regression exercise. Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
680379d to
191d09e
Compare
|
Broke it even further, as requested. |
Increase coverage test on offline testing.
testing_offline has gone from 61% to 69% total coverage.
We are now including:
The _repsources/*.py files should be more effectively covered by testing_trackers.py.
How to run
Execute tests
PYTHONPATH=. coverage run regzbot/commandl.py test --offlineCompile report
coverage report