Closed NecroKote closed 2 years ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
torrt/toolbox.py | 12 | 13 | 92.31% | ||
<!-- | Total: | 17 | 18 | 94.44% | --> |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
torrt/utils.py | 1 | 87.21% | ||
<!-- | Total: | 1 | --> |
Totals | |
---|---|
Change from base Build 1798299692: | 1.6% |
Covered Lines: | 1158 |
Relevant Lines: | 1672 |
@idlesign I think this one is done. Please review it again.
I've added a bunch of tests for new logic:
test_no_bots_to_run_exists
checks that in deed, sys.exit(1)
occurs on torrt run_bots
without having a single configured bottest_telegram_without_plugin_raises_exception
basic check, that telegram behaves as we expect (raises BotRegistrationFailed
)test_bot_configured_but_unregistered
checks that the user sees a new warning, about configured, but unregistered bot (for example - forgot to install plugin. this happens to me all the time)PS: Python 3.6 failing because of dependency shift. I'll prepare basic 'housekeeping' PR - shifting dates to 2022, removing 3.6 support etc..
Thank you. Merged.
Nice addition to #76
BotRegistrationFailed
if there are dependencies missing.run_bots
now exits with code 1 if were were no actual bots to run. this waysystemd
(orsupervisord
) status will show whether there is something wrong with bots on the startrenamedtest_bots
totest_bot_telegram
and made it conditional on the required package. this helps to pass tests on build servers without installing additional dependencies.(duplicate of #77, as for some reason it didn't pull latest commit)