Message285508
| Author | gms |
|---|---|
| Recipients | Arve.Knudsen, José.Luis.Lafuente, berker.peksag, gms, kushal.das, michael.foord, mucka, pkoning |
| Date | 2017-01-15.09:32:04 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1484472725.38.0.550584285291.issue21258@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
For working around this issue on Python 3.5 it is sufficient to overwrite just the `return_value.__iter__` method of the object returned by `mock_open()` with an iterator that calls the mocked `readline()` method until it returns the empty string. cf. e.g. https://github.com/gsauthof/utility/blob/6489c7215dac341be4e40e5348e64d69461766dd/user-installed.py#L176-L179 This also works in combination with `csv.reader()`, i.e. when calling it with the mocked file object. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2017-01-15 09:32:05 | gms | set | recipients: + gms, michael.foord, Arve.Knudsen, berker.peksag, kushal.das, pkoning, José.Luis.Lafuente, mucka |
| 2017-01-15 09:32:05 | gms | set | messageid: <1484472725.38.0.550584285291.issue21258@psf.upfronthosting.co.za> |
| 2017-01-15 09:32:05 | gms | link | issue21258 messages |
| 2017-01-15 09:32:04 | gms | create | |