Closed a-detiste closed 3 months ago
No problem.
Would you accept to hybridize mock usage ?
Like this:
try: from unittest import mock except ImportError: import mock
We are slowly trying to remove mock,nose,unittest2,future etc... from Debian; so what is done is done :-)
Le jeu. 28 mars 2024 à 12:27, Andrea Francia @.***> a écrit :
Thank you for your contribution but I'm still using the old mock library to keep trash-cli compatible with python 2.7
— Reply to this email directly, view it on GitHub https://github.com/andreafrancia/trash-cli/pull/331#issuecomment-2024958427, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB47WUGAGZUZYU7ZBKTPG6TY2PWA7AVCNFSM6AAAAABCDJAI5WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRUHE2TQNBSG4 . You are receiving this because you authored the thread.Message ID: @.***>
Yes, but this code should be put in single place. We already have code like this:
from trashcli.compat import Protocol
If you want can make it works also for Mock
and call
, something like
from trashcli.compat import Mock
from trashcli.compat import call
Thank you
Thank you for your contribution but I'm still using the old mock library to keep trash-cli compatible with python 2.7