File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -600,12 +600,12 @@ this list of calls for us::
600600Partial mocking
601601~~~~~~~~~~~~~~~
602602
603- In some tests I wanted to mock out a call to :meth: `datetime.date.today `
604- to return a known date, but I didn't want to prevent the code under test from
603+ For some tests you may want to mock out a call to :meth: `datetime.date.today `
604+ to return a known date, but you may not want to prevent the code under test from
605605creating new date objects. Unfortunately :class: `datetime.date ` is written in C, and
606- so I couldn't just monkey-patch out the static :meth: `datetime.date.today ` method.
606+ so you cannot just monkey-patch out the static :meth: `datetime.date.today ` method.
607607
608- I found a simple way of doing this that involved effectively wrapping the date
608+ A simple way of doing this involves effectively wrapping the date
609609class with a mock, but passing through calls to the constructor to the real
610610class (and returning real instances).
611611
You can’t perform that action at this time.
0 commit comments