[tahoe-lafs-trac-stream] [Tahoe-LAFS] #3519: Stop using the mock library for testing

Tahoe-LAFS trac at tahoe-lafs.org
Tue Nov 24 18:11:59 UTC 2020


#3519: Stop using the mock library for testing
-------------------------+-----------------------
     Reporter:  exarkun  |      Owner:  exarkun
         Type:  defect   |     Status:  new
     Priority:  normal   |  Milestone:  undecided
    Component:  unknown  |    Version:  n/a
   Resolution:           |   Keywords:  mock
Launchpad Bug:           |
-------------------------+-----------------------
Description changed by exarkun:

Old description:

> Some discussion about motivations for this
>
> *
> https://nedbatchelder.com/blog/201206/tldw_stop_mocking_start_testing.html
> to start
> * ​https://pythonspeed.com/articles/verified-fakes/
> * ​https://martinfowler.com/articles/mocksArentStubs.html
>
> Instead:
>
> * Where possible, we will completely remove whatever role the mock is
> serving from the test and focus on more well-defined, isolated units of
> functionality.
> * Failing that, where possible, we will use the implementation that is
> used under real usage of whatever the relevant interface is.
> * Failing that, we will use verified fakes of whatever the relevant
> interface is.
>
> This is a tracking ticket for various other tickets which make progress
> towards this goal.  There are too many uses of mock to address this all
> at once.  Fortunately each use should be essentially independent from the
> rest so the task is easily broken up.

New description:

 Some discussion about motivations for this

 *
 https://nedbatchelder.com/blog/201206/tldw_stop_mocking_start_testing.html
 to start
 * ​https://pythonspeed.com/articles/verified-fakes/
 * ​https://martinfowler.com/articles/mocksArentStubs.html

 Instead:

 * Where possible, we will completely remove whatever role the mock is
 serving from the test and focus on more well-defined, isolated units of
 functionality.
 * Failing that, where possible, we will use the implementation that is
 used under real usage of whatever the relevant interface is.
 * Failing that, we will use verified fakes of whatever the relevant
 interface is.

 This is a tracking ticket for various other tickets which make progress
 towards this goal.  There are too many uses of mock to address this all at
 once.  Fortunately each use should be essentially independent from the
 rest so the task is easily broken up.

 [query:status=new|assigned|reopened&keywords=~mock Individual
 implementation tickets]

--

--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3519#comment:2>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list