Changeset 09bbe78


Ignore:
Timestamp:
Sep 15, 2020, 4:14:29 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
0dbecad
Parents:
77a2994
Message:

Fix 2 cases where the test would open files as utf-8 and could fail

Location:
tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tests/pybin/tools.py

    r77a2994 r09bbe78  
    120120                return None
    121121
    122         file = open(file, mode)
     122        file = open(file, mode, encoding="latin-1") # use latin-1 so all chars mean something.
    123123        exitstack.push(file)
    124124        return file
  • tests/test.py

    r77a2994 r09bbe78  
    207207                else:
    208208                        if os.stat(out_file).st_size < 1048576:
    209                                 with open (out_file, "r") as myfile:
     209                                with open (out_file, "r", encoding='latin-1') as myfile:  # use latin-1 so all chars mean something.
    210210                                        error = myfile.read()
    211211                        else:
Note: See TracChangeset for help on using the changeset viewer.