[extensions-web] Use genexps, not listcomps to retrieve all shell version strings
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] Use genexps, not listcomps to retrieve all shell version strings
- Date: Tue, 1 Nov 2011 14:48:08 +0000 (UTC)
commit f65c9c4343073f8646b506ccfc24d65bd223e2ad
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Oct 31 19:40:35 2011 -0400
Use genexps, not listcomps to retrieve all shell version strings
sweettooth/extensions/tests.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/sweettooth/extensions/tests.py b/sweettooth/extensions/tests.py
index a6578be..e308c55 100644
--- a/sweettooth/extensions/tests.py
+++ b/sweettooth/extensions/tests.py
@@ -257,7 +257,7 @@ class ExtensionVersionTest(BasicUserTestCase, TestCase):
version.parse_metadata_json(metadata)
version.save()
- shell_versions = sorted([sv.version_string for sv in version.shell_versions.all()])
+ shell_versions = sorted(sv.version_string for sv in version.shell_versions.all())
self.assertEquals(shell_versions, ["3.0.0", "3.0.1", "3.0.2"])
def test_shell_versions_stable(self):
@@ -275,7 +275,7 @@ class ExtensionVersionTest(BasicUserTestCase, TestCase):
version.parse_metadata_json(metadata)
version.save()
- shell_versions = sorted([sv.version_string for sv in version.shell_versions.all()])
+ shell_versions = sorted(sv.version_string for sv in version.shell_versions.all())
self.assertEquals(shell_versions, ["3.0", "3.2"])
class ShellVersionTest(TestCase):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]