ci: Use UTF-8 encoding for the test cover report

Since we're embedding text coming from the tests into the report, we
should specify an encoding for both the source JSON file and the target
XML file when opening them.
This commit is contained in:
Emmanuele Bassi
2019-04-06 14:20:02 +01:00
parent 279cb5717c
commit eadd90c22e

View File

@@ -19,11 +19,11 @@ aparser.add_argument('--branch', metavar='NAME',
default='master')
aparser.add_argument('--output', metavar='FILE',
help='The output file, stdout by default',
type=argparse.FileType('w'),
type=argparse.FileType('w', encoding='UTF-8'),
default=sys.stdout)
aparser.add_argument('infile', metavar='FILE',
help='The input testlog.json, stdin by default',
type=argparse.FileType('r'),
type=argparse.FileType('r', encoding='UTF-8'),
default=sys.stdin)
args = aparser.parse_args()