Skip to content

Commit

Permalink
Add initial unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
ideoforms committed May 31, 2019
1 parent 3212524 commit d812ecb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@
'Topic :: Artistic Software',
'Development Status :: 4 - Beta',
'Intended Audience :: Developers'
]
],
setup_requires=['pytest-runner'],
tests_require=['pytest', 'pytest-timeout']
)
15 changes: 15 additions & 0 deletions tests/test_pattern.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
""" Unit tests for isobar """

import pytest
import isobar
import time
import os

def test_pattern():
p = isobar.PSeq([ 1, 2, 3, 4 ], 1)
assert next(p) == 1
assert next(p) == 2
assert next(p) == 3
assert next(p) == 4
with pytest.raises(StopIteration) as excinfo:
next(p)

0 comments on commit d812ecb

Please sign in to comment.