Browse Source

Use splitext to allow arbitrarw extensions

pull/203/head
Oliverpool 9 years ago
parent
commit
a844148a4e
  1. 2
      patacrep/songbook/__init__.py
  2. 2
      test/test_songbook/test_compilation.py

2
patacrep/songbook/__init__.py

@ -38,7 +38,7 @@ def open_songbook(filename):
songbook = _add_songbook_defaults(user_songbook)
songbook['_filepath'] = filename
songbook['_basename'] = os.path.basename(filename)[:-len(".yaml")]
songbook['_basename'] = os.path.splitext(os.path.basename(filename))[0]
# Gathering datadirs
songbook['_datadir'] = list(_iter_absolute_datadirs(songbook))

2
test/test_songbook/test_compilation.py

@ -36,7 +36,7 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest):
os.path.dirname(__file__),
'*.yaml',
))):
base = songbook[:-len(".yaml")]
base = os.path.splitext(songbook)[0]
yield (
"test_latex_generation_{}".format(os.path.basename(base)),
cls._create_generation_test(base),

Loading…
Cancel
Save