Browse Source

Use the same open_read function for the tests

pull/126/head
Oliverpool 9 years ago
parent
commit
523a513b86
  1. 2
      test/test_chordpro/metadata.sgc
  2. 2
      test/test_chordpro/metadata.tex
  3. 3
      test/test_chordpro/test_parser.py

2
test/test_chordpro/metadata.sgc

@ -7,7 +7,7 @@
{title: Subtitle4}
{title: Subtitle5}
{artist: Author1}
{artist: Texte de Jean Richepin, chanté par Georges Brassens}
{artist: Texte de Jean Richepin, chanté par Georges Brassens}
{album: Album}
{copyright: Copyright}
{cov: metadata_cover}

2
test/test_chordpro/metadata.tex

@ -8,7 +8,7 @@ Subtitle4\\
Subtitle5}[
by={
Author1,
Texte de Jean Richepin, chanté par Georges Brassens },
Texte de Jean Richepin, chanté par Georges Brassens },
album={Album},
copyright={Copyright},
cov={img/test/test_chordpro/metadata_cover},

3
test/test_chordpro/test_parser.py

@ -9,6 +9,7 @@ from pkg_resources import resource_filename
from patacrep import files
from patacrep.build import DEFAULT_CONFIG
from patacrep.encoding import open_read
from .. import disable_logging
@ -63,7 +64,7 @@ class FileTestMeta(type):
if base is None or dest is None:
return
destname = "{}.{}".format(base, dest)
with open(destname, 'r', encoding='utf8') as expectfile:
with open_read(destname) as expectfile:
chordproname = "{}.source".format(base)
with disable_logging():
self.assertMultiLineEqual(

Loading…
Cancel
Save