Skip to content

Commit d812ecb

Browse files
committed
Add initial unit test
1 parent 3212524 commit d812ecb

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,7 @@
2727
'Topic :: Artistic Software',
2828
'Development Status :: 4 - Beta',
2929
'Intended Audience :: Developers'
30-
]
30+
],
31+
setup_requires=['pytest-runner'],
32+
tests_require=['pytest', 'pytest-timeout']
3133
)

tests/test_pattern.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
""" Unit tests for isobar """
2+
3+
import pytest
4+
import isobar
5+
import time
6+
import os
7+
8+
def test_pattern():
9+
p = isobar.PSeq([ 1, 2, 3, 4 ], 1)
10+
assert next(p) == 1
11+
assert next(p) == 2
12+
assert next(p) == 3
13+
assert next(p) == 4
14+
with pytest.raises(StopIteration) as excinfo:
15+
next(p)

0 commit comments

Comments
 (0)