summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-02-13 20:45:02 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-02-13 20:45:02 +0000
commit566d0b9486f024f253d1c331866b04529c9a22b3 (patch)
tree16116df7724cb735c273a26575f6bb2c642fb75b /testing
parentd0a6f75ffd6a760c70771cc237b843b1ac2a94ee (diff)
downloadpdfium-566d0b9486f024f253d1c331866b04529c9a22b3.tar.xz
Fix nits in Python code.
Change-Id: I01956bff9e7250c9df84afe6b6de96ab4e9b4851 Reviewed-on: https://pdfium-review.googlesource.com/26650 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'testing')
-rwxr-xr-xtesting/tools/fixup_pdf_template.py6
-rw-r--r--testing/tools/test_runner.py1
2 files changed, 3 insertions, 4 deletions
diff --git a/testing/tools/fixup_pdf_template.py b/testing/tools/fixup_pdf_template.py
index 10ca241242..0f31eccada 100755
--- a/testing/tools/fixup_pdf_template.py
+++ b/testing/tools/fixup_pdf_template.py
@@ -35,7 +35,7 @@ class TemplateProcessor:
TRAILER_TOKEN = '{{trailer}}'
TRAILER_REPLACEMENT = 'trailer<< /Root 1 0 R /Size %d >>'
- STARTXREF_TOKEN= '{{startxref}}'
+ STARTXREF_TOKEN = '{{startxref}}'
STARTXREF_REPLACEMENT = 'startxref\n%d'
OBJECT_PATTERN = r'\{\{object\s+(\d+)\s+(\d+)\}\}'
@@ -45,7 +45,7 @@ class TemplateProcessor:
self.offset = 0
self.xref_offset = 0
self.max_object_number = 0
- self.objects = { }
+ self.objects = {}
def insert_xref_entry(self, object_number, generation_number):
self.objects[object_number] = (self.offset, generation_number)
@@ -86,7 +86,7 @@ def expand_file(input_path, output_path):
with open(input_path, 'rb') as infile:
with open(output_path, 'wb') as outfile:
for line in infile:
- outfile.write(processor.process_line(line))
+ outfile.write(processor.process_line(line))
except IOError:
print >> sys.stderr, 'failed to process %s' % input_path
diff --git a/testing/tools/test_runner.py b/testing/tools/test_runner.py
index e895552bc8..99ba8758e0 100644
--- a/testing/tools/test_runner.py
+++ b/testing/tools/test_runner.py
@@ -3,7 +3,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import cStringIO
import functools
import multiprocessing
import optparse