From 29942d38bb88e4654879bcaff0a004c646e1a315 Mon Sep 17 00:00:00 2001 From: mathieui Date: Mon, 27 Oct 2014 20:01:22 +0100 Subject: Add some unit tests using py.test - we need to have more --- test/test_poopt.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/test_poopt.py (limited to 'test/test_poopt.py') 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)] -- cgit v1.2.3