Message297854
| Author |
terry.reedy |
| Recipients |
terry.reedy |
| Date |
2017年07月07日.02:56:34 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1499396195.9.0.947887140078.issue30868@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
When writing tests for config and configdialog, I blocked the user configs from hitting the filesystem by passing '' as the file name. This disables the Save function. To know that Save is called, a mock is needed. To know what would have been written to disk, the mock could write to a StringIO. Since there are 4 files and 4 config parsers, there are 4 save functions. I would mock each separately so it can be determined that the right one was called. I plan to create a specialized version of idle_mock.Func with a simplified version of Save's body in the __call__ method. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2017年07月07日 02:56:35 | terry.reedy | set | recipients:
+ terry.reedy |
| 2017年07月07日 02:56:35 | terry.reedy | set | messageid: <1499396195.9.0.947887140078.issue30868@psf.upfronthosting.co.za> |
| 2017年07月07日 02:56:35 | terry.reedy | link | issue30868 messages |
| 2017年07月07日 02:56:34 | terry.reedy | create |
|