~cjwatson/meliae/py3-loader-source-bytes

Viewing all changes in revision 221.

  • Committer: Colin Watson
  • Date: 2020-02-05 11:17:38 UTC
  • Revision ID: cjwatson@canonical.com-20200205111738-aua54t9ux71fqy42
Ensure coherent bytes/text handling of sources in meliae.loader.

meliae.files.open_file (called by load if given a string file name) opens
files in binary mode, so it seems most appropriate for the loader tests to
pass in dumps as bytes.  However, parsing is easier with text, so decode
lines at the boundary before parsing them.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: