-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes error loading unicode filenames
- Loading branch information
Florian Krebs
authored and
Sebastian Böck
committed
Nov 30, 2016
1 parent
c818076
commit abadca3
Showing
4 changed files
with
45 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# encoding: utf-8 | ||
# pylint: skip-file | ||
""" | ||
This file contains tests for the madmom.processors module. | ||
""" | ||
|
||
from __future__ import absolute_import, division, print_function | ||
import tempfile | ||
import unittest | ||
import sys | ||
|
||
from madmom.models import * | ||
from madmom.ml.nn import NeuralNetwork | ||
|
||
tmp_file = tempfile.NamedTemporaryFile(delete=False).name | ||
|
||
|
||
class TestProcessor(unittest.TestCase): | ||
|
||
def test_unicode(self): | ||
if sys.version_info[0] == 2: | ||
# load from unicode string | ||
rnn = NeuralNetwork.load(unicode(ONSETS_RNN[0])) | ||
# save to unicode string | ||
rnn.dump(unicode(tmp_file)) | ||
|
||
|
||
# clean up | ||
def teardown(): | ||
import os | ||
os.unlink(tmp_file) |