diff options
| author | Barry Warsaw | 2016-01-11 22:52:33 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2016-01-11 22:52:33 -0500 |
| commit | 03bb57c8c2a47a08e19b20975622ebb2ef2b81c6 (patch) | |
| tree | 332bf1e5e36da0a3cb4271b1a471a62865071a62 /src/mailman/testing | |
| parent | 58ee14bfb1c1c24d06fb0509e42e06e37a505479 (diff) | |
| download | mailman-03bb57c8c2a47a08e19b20975622ebb2ef2b81c6.tar.gz mailman-03bb57c8c2a47a08e19b20975622ebb2ef2b81c6.tar.zst mailman-03bb57c8c2a47a08e19b20975622ebb2ef2b81c6.zip | |
Several optimizations:
* Use `yield from` wherever appropriate.
* Use SA's .one_or_none() where appropriate.
- Fix a bug in MailingList.pass_extensions.
- Use ValueError in other places for consistency.
- Remove unreached/nonsense code.
- Simplify the SubscriptionService.find_member() and .find_members()
implementations.
- Boost coverage.
Diffstat (limited to 'src/mailman/testing')
| -rw-r--r-- | src/mailman/testing/helpers.py | 3 | ||||
| -rw-r--r-- | src/mailman/testing/mta.py | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/mailman/testing/helpers.py b/src/mailman/testing/helpers.py index ea940dbcf..fa16c1f7f 100644 --- a/src/mailman/testing/helpers.py +++ b/src/mailman/testing/helpers.py @@ -220,8 +220,7 @@ class TestableMaster(Master): @property def runner_pids(self): """The pids of all the child runner processes.""" - for pid in self._started_kids: - yield pid + yield from self._started_kids diff --git a/src/mailman/testing/mta.py b/src/mailman/testing/mta.py index a75e49237..9642803e2 100644 --- a/src/mailman/testing/mta.py +++ b/src/mailman/testing/mta.py @@ -251,8 +251,7 @@ class ConnectionCountingController(QueueController): @property def messages(self): """Return all the messages received by the SMTP server.""" - for message in self: - yield message + yield from self def clear(self): """Clear all the messages from the queue.""" |
