Skip to content

Commit

Permalink
PDF files are binary, remove new-line normalization
Browse files Browse the repository at this point in the history
Hat-tip Robin at ReportLab, see
biopython#1737 (comment)
  • Loading branch information
peterjc committed Aug 13, 2018
1 parent a5fe524 commit c7b909e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Tests/test_GenomeDiagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,9 +768,7 @@ def test_partial_diagram(self):
gdd.write(output_filename, 'PDF')

# Also check the write_to_string (bytes string) method matches,
# (Note the possible confusion over new lines on Windows)
assert open(output_filename, "rb").read().replace(b"\r\n", b"\n") \
== gdd.write_to_string('PDF').replace(b"\r\n", b"\n")
assert open(output_filename, "rb").read() == gdd.write_to_string('PDF')

output_filename = os.path.join('Graphics', 'GD_region_linear.svg')
gdd.write(output_filename, 'SVG')
Expand Down

0 comments on commit c7b909e

Please sign in to comment.