tests/test_note2midi.py: use unicode_literals, preparing for python3
authorPaul Brossier <piem@piem.org>
Mon, 18 Apr 2016 22:45:12 +0000 (00:45 +0200)
committerPaul Brossier <piem@piem.org>
Mon, 18 Apr 2016 22:45:12 +0000 (00:45 +0200)
python/tests/test_note2midi.py

index 055580e..72884f0 100755 (executable)
@@ -1,6 +1,8 @@
 #! /usr/bin/env python
 # -*- coding: utf-8 -*-
 
+from __future__ import unicode_literals
+
 from aubio import note2midi, freq2note
 import unittest
 
@@ -14,13 +16,13 @@ list_of_known_notes = (
         ( 'A4', 69 ),
         ( 'A#4', 70 ),
         ( 'Bb4', 70 ),
-        ( u'B♭4', 70 ),
+        ( 'B♭4', 70 ),
         ( 'G8', 115 ),
-        ( u'G♯8', 116 ),
+        ( 'G♯8', 116 ),
         ( 'G9', 127 ),
-        ( u'G\udd2a2', 45 ),
-        ( u'B\ufffd2', 45 ),
-        ( u'A♮2', 45 ),
+        ( 'G\udd2a2', 45 ),
+        ( 'B\ufffd2', 45 ),
+        ( 'A♮2', 45 ),
         )
 
 class note2midi_good_values(unittest.TestCase):