Permalink
Browse files

More tests.

  • Loading branch information...
1 parent 6d8fb1a commit 2e6f20ae42cde2690a04764af138d06746abcb0c @athoune committed Apr 29, 2012
Showing with 12 additions and 2 deletions.
  1. +1 −1 src/aphone/__init__.py
  2. +10 −1 test/header_test.py
  3. +1 −0 test/test_phonet.py
View
@@ -6,7 +6,7 @@ def __init__(self, data):
def __iter__(self):
for line in self.data:
- if len(line) == 1:
+ if len(line) <= 1:
continue
if line[0] == '#':
continue
View
@@ -6,7 +6,7 @@
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__) + '/../src'))
-from aphone import Header
+from aphone import Header, Reader
class HeaderTest(unittest.TestCase):
@@ -19,3 +19,12 @@ def test_header(self):
soundslike fr"""
h = Header(StringIO(txt))
self.assertEqual('fr', h.name)
+
+ def test_blank(self):
+ txt = """pim
+pam
+
+poum
+"""
+ r = Reader(StringIO(txt))
+ self.assertEqual(['pim', 'pam', 'poum'], list(r))
View
@@ -25,6 +25,7 @@
AUX$ O
AU O
A A
+
TOTO< O
"""

0 comments on commit 2e6f20a

Please sign in to comment.