summaryrefslogtreecommitdiff
path: root/test/test_poopt.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2014-10-27 20:01:22 +0100
committermathieui <mathieui@mathieui.net>2014-10-27 20:01:22 +0100
commit29942d38bb88e4654879bcaff0a004c646e1a315 (patch)
tree7ca36bd4a66ad1964c545d1241fdc4eb7b8bc927 /test/test_poopt.py
parentf55ac9edbfbfeb13e93cb101df8d38bd7bcce15a (diff)
downloadpoezio-29942d38bb88e4654879bcaff0a004c646e1a315.tar.gz
poezio-29942d38bb88e4654879bcaff0a004c646e1a315.tar.bz2
poezio-29942d38bb88e4654879bcaff0a004c646e1a315.tar.xz
poezio-29942d38bb88e4654879bcaff0a004c646e1a315.zip
Add some unit tests using py.test
- we need to have more
Diffstat (limited to 'test/test_poopt.py')
-rw-r--r--test/test_poopt.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test_poopt.py b/test/test_poopt.py
new file mode 100644
index 00000000..9b640ff0
--- /dev/null
+++ b/test/test_poopt.py
@@ -0,0 +1,14 @@
+"""
+Test of the poopt module
+"""
+
+import pytest
+import sys
+sys.path.append('src')
+
+from poopt import cut_text
+
+def test_cut_text():
+
+ text = '12345678901234567890'
+ assert cut_text(text, 5) == [(0, 5), (5, 10), (10, 15), (15, 20)]