|
@ -5,6 +5,7 @@ |
|
|
import glob |
|
|
import glob |
|
|
import logging |
|
|
import logging |
|
|
import os |
|
|
import os |
|
|
|
|
|
import sys |
|
|
import subprocess |
|
|
import subprocess |
|
|
import unittest |
|
|
import unittest |
|
|
|
|
|
|
|
@ -75,7 +76,7 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest): |
|
|
"@DATA_FOLDER@", |
|
|
"@DATA_FOLDER@", |
|
|
path2posix( |
|
|
path2posix( |
|
|
subprocess.check_output( |
|
|
subprocess.check_output( |
|
|
["python", "-c", 'import patacrep, pkg_resources; print(pkg_resources.resource_filename(patacrep.__name__, "data"))'], # pylint: disable=line-too-long |
|
|
[sys.executable, "-c", 'import patacrep, pkg_resources; print(pkg_resources.resource_filename(patacrep.__name__, "data"))'], # pylint: disable=line-too-long |
|
|
universal_newlines=True, |
|
|
universal_newlines=True, |
|
|
cwd=os.path.dirname(songbook), |
|
|
cwd=os.path.dirname(songbook), |
|
|
).strip() |
|
|
).strip() |
|
@ -111,7 +112,7 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest): |
|
|
@staticmethod |
|
|
@staticmethod |
|
|
def compile_songbook(songbook, steps=None): |
|
|
def compile_songbook(songbook, steps=None): |
|
|
"""Compile songbook, and return the command return code.""" |
|
|
"""Compile songbook, and return the command return code.""" |
|
|
command = ['python', '-m', 'patacrep.songbook', songbook, '-v'] |
|
|
command = [sys.executable, '-m', 'patacrep.songbook', songbook, '-v'] |
|
|
if steps: |
|
|
if steps: |
|
|
command.extend(['--steps', steps]) |
|
|
command.extend(['--steps', steps]) |
|
|
|
|
|
|
|
|