Merge lp:~pwlars/qa-iso-static-validation-test/typos into lp:qa-iso-static-validation-test

Proposed by Paul Larson
Status: Merged
Merged at revision: 19
Proposed branch: lp:~pwlars/qa-iso-static-validation-test/typos
Merge into: lp:qa-iso-static-validation-test
Diff against target: 114 lines (+19/-16)
1 file modified
iso_static_validation.py (+19/-16)
To merge this branch: bzr merge lp:~pwlars/qa-iso-static-validation-test/typos
Reviewer Review Type Date Requested Status
Paul Larson Approve
Review via email: mp+125827@code.launchpad.net

Description of the change

*cough* :)

To post a comment you must log in.
Revision history for this message
Paul Larson (pwlars) wrote :

obvious changes, self-approving and just submitting the MP for your awareness.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'iso_static_validation.py'
2--- iso_static_validation.py 2012-09-21 16:07:47 +0000
3+++ iso_static_validation.py 2012-09-21 22:11:20 +0000
4@@ -32,13 +32,13 @@
5 import shutil
6
7
8-
9 class TestValidateISO(unittest.TestCase):
10 @classmethod
11 def setUpClass(cls):
12 # Defaults
13 cls.DEFAULT_URL = 'http://cdimage.ubuntu.com/'
14- cls.ARCHIVE_TEST_URL = 'http://people.canonical.com/~ubuntu-archive/testing/'
15+ cls.ARCHIVE_TEST_URL = ('http://people.canonical.com/~ubuntu-archive'
16+ '/testing/')
17
18 #constants
19 cls.ONE_MB_BLOCK = 2 ** 20
20@@ -46,9 +46,8 @@
21 cls.QUANTAL_SIZE_LIMIT_MB = 838860800
22
23 #Read the iso name and initialise global variables
24- cls.isoroot=os.getenv('ISOROOT')
25- cls.name=os.getenv('ISONAME')
26-
27+ cls.isoroot = os.getenv('ISOROOT')
28+ cls.name = os.getenv('ISONAME')
29
30 if cls.name == None or '.iso' not in cls.name or cls.isoroot == None:
31 print("Please see the README")
32@@ -56,9 +55,12 @@
33 else:
34 cls.st_name = cls.name.rstrip('.iso')
35 try:
36- (cls.st_release, cls.st_variant, cls.st_arch) = cls.st_name.rsplit('-')
37+ (cls.st_release,
38+ cls.st_variant,
39+ cls.st_arch) = cls.st_name.rsplit('-')
40 except ValueError:
41- sys.exit("Image name must be in the form of release-variant-arch.iso")
42+ sys.exit("Image name must be in the form of "
43+ "release-variant-arch.iso")
44
45 #Set a flag for ubiquity based images
46 if cls.st_variant == 'desktop' or cls.st_variant == 'dvd':
47@@ -70,7 +72,7 @@
48 except OSError:
49 print("Creating temp dirrectory failed")
50 raise
51-
52+
53 def setUp(self):
54 self.iso_name = self.name
55 self.block_size = self.ONE_MB_BLOCK
56@@ -92,7 +94,8 @@
57 self.url = os.path.join(self.DEFAULT_URL, 'ubuntu-server',
58 'precise', 'daily')
59 else: # current dev release
60- self.url = os.path.join(self.DEFAULT_URL, 'ubuntu-server', 'daily')
61+ self.url = os.path.join(
62+ self.DEFAULT_URL, 'ubuntu-server', 'daily')
63 else:
64 self.fail("Image name be in the form of release-variant-arch.iso")
65
66@@ -108,7 +111,7 @@
67 except urllib2.HTTPError, e:
68 self.fail(
69 "Failed to fetch URL '{0}': {1}. Aborting!".format(
70- ha256sum_url, e))
71+ sha256sum_url, e))
72
73 # Process the file (contains a number of entries containing iso
74 # names and the corresponding checksums)
75@@ -121,7 +124,7 @@
76 iso_sha256 = current_iso_digest[self.iso_name]
77 except KeyError:
78 self.fail("No digest found for image '{0}'".format(
79- elf.iso_name))
80+ self.iso_name))
81
82 # Validate checksum of file fname against sha256 hash
83 sha256 = hashlib.sha256()
84@@ -168,7 +171,7 @@
85
86 # Test if the manfest is the same as that is given in the server
87 def test_manifest(self):
88- if(self.ubiquity_image==False):
89+ if(self.ubiquity_image == False):
90 self.skipTest("manifest only for ubiquity based images")
91 manifest_url = os.path.join(self.url, 'current',
92 self.st_release + '-' +
93@@ -179,8 +182,8 @@
94 except urllib2.HTTPError, e:
95 logging.error("Failed to fetch URL '%s': %s . Aborting!",
96 manifest_url, e)
97- self.fail(
98- "Failed to fetch manifest file from the server:\n{0}".format(e))
99+ self.fail("Failed to fetch manifest file from the "
100+ "server:\n{0}".format(e))
101
102 cmd = ["bsdtar", "-xf", self.iso_location, "-C", self.temp_dir,
103 "casper/filesystem.manifest"]
104@@ -377,8 +380,8 @@
105 logging.error("Failed to fetch URL '%s': %s .", report_url, e)
106 self.fail("Failed to fetch report.html from the server")
107
108- uninst_pkgs = re.findall('"?([^" >]+ )produces uninstallable binaries',
109- fh_report_page)
110+ uninst_pkgs = re.findall(
111+ '"?([^" >]+ )produces uninstallable binaries', fh_report_page)
112
113 try:
114 fh_probs_page = urllib2.urlopen(self.probs_url).read()

Subscribers

People subscribed via source and target branches

to all changes: