Skip to content

Commit 285d930

Browse files
author
Caleb Hyde
committed
Start adding tests; Git ignore pyc files, emacs temp files
1 parent 02051ec commit 285d930

File tree

7 files changed

+67
-1
lines changed

7 files changed

+67
-1
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
output.avi
1+
output.avi
2+
*pyc
3+
*~
4+
#*#

test.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env python
2+
3+
if __name__ == '__main__':
4+
import unittest
5+
tests = unittest.TestLoader().discover('tests')
6+
unittest.TextTestRunner().run(tests)

tests/__init__.py

Whitespace-only changes.

tests/__init__.pyc

134 Bytes
Binary file not shown.

tests/test_algos.py

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
from unittest import TestCase
2+
3+
from src.algos import *
4+
5+
class TestAlgos(TestCase):
6+
7+
def setUp(self):
8+
pass
9+
10+
def test_crop(self):
11+
self.assertTrue(False)
12+
13+
def test_create_distortion_matrix(self):
14+
self.assertTrue(False)
15+
16+
def test_transfomr(self):
17+
self.assertTrue(False)
18+
19+
def test_join_images(self):
20+
l_part = [1, 2]
21+
r_part = [3, 4]
22+
left = np.array([l_part, l_part])
23+
right = np.array([r_part, r_part])
24+
25+
result = join_images(left, right)
26+
27+
l_part.extend(r_part)
28+
self.assertEqual(
29+
result.tolist(),
30+
[l_part, l_part],
31+
)
32+
33+
def test_translate(self):
34+
self.assertTrue(False)
35+
36+
def test_print_params(self):
37+
self.assertTrue(False)
38+
39+
def test_parameters(self):
40+
for parameter in [
41+
'width',
42+
'height',
43+
'fps',
44+
'key_mappings',
45+
]:
46+
self.assertTrue(
47+
getattr(Parameters, parameter)
48+
)

tests/test_algos.pyc

2.2 KB
Binary file not shown.

tests/test_algos.py~

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import unittest
2+
3+
class TestAlgos(unittest.TestCase):
4+
5+
def setUp(self):
6+
pass
7+
8+
def test_crop(self):
9+
assert_true(False)

0 commit comments

Comments
 (0)