Member
Closes #3414. I double checked that tests do fail if any of the defaults-handling logic in tg.Bot is removed.
- Finds a solution to not having to call
get_meafter each assertion or even after checkingget_mevia mocking it. - Introduces a new directory
tests/auxilwith a filebot_methods_checks.pyin it where I moved the respective functions fromconftest.pyto. If this finds approval, I would move all other non-fixture things fromconf.pyinto separate files withintests/auxil.
Member
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm definitely for splitting up non-fixture things from conftest to this new directory. In fact, can you also extract the nested functions inside check_defaults_handling into new functions (maybe in the same file)? Would make the code in there more readable at least
Member Author
In fact, can you also extract the nested functions inside
check_defaults_handlinginto new functions (maybe in the same file)? Would make the code in there more readable at least
Those functions are nested because they work with several of the variables defined within check_defaults_handling/check_shortcut_call. Extracting those methods would mean that I'd have to add several more arguments to them & set them with functools.partial. I don't see a compelling benefit of that tbh …
Member
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, I can verify if this works only after this is merged to master, but the tests passing here are a good indication it will.