kopia lustrzana https://gitlab.com/zeograd/rnsutils
Support python2.7 in instrument loading
rodzic
42048f3360
commit
30e5973494
|
@ -43,7 +43,7 @@ class RenoiseInstrument(object):
|
|||
else:
|
||||
try:
|
||||
self.load(template_filename)
|
||||
except FileNotFoundError:
|
||||
except IOError:
|
||||
self.load(io.BytesIO(pkgutil.get_data('rnsutils', 'data/{}'.format(template_filename))))
|
||||
|
||||
self.extract_sample_template()
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
import unittest
|
||||
|
||||
from rnsutils.instrument import RenoiseInstrument
|
||||
|
||||
|
||||
def test_open_template():
|
||||
# creates an empty instrument, which trigger template loading
|
||||
RenoiseInstrument()
|
||||
class TestParse(unittest.TestCase):
|
||||
def test_open_template(self):
|
||||
# creates an empty instrument, which trigger template loading
|
||||
RenoiseInstrument()
|
||||
|
||||
def test_missing_template(self):
|
||||
with self.assertRaises(Exception):
|
||||
RenoiseInstrument(template_filename='I dont exist.xnri')
|
||||
|
|
Ładowanie…
Reference in New Issue