Mercurial > hg > tvii
annotate tests/test_dot.py @ 7:bb8b6b06ca83
dot product
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Thu, 31 Aug 2017 08:50:36 -0700 |
parents | 382ab19fb052 |
children |
rev | line source |
---|---|
5
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
1 #!/usr/bin/env python |
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
2 |
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
3 """ |
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
4 test dot product |
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
5 """ |
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
6 |
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
7 import unittest |
7 | 8 from tvii.dot import dot |
5
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
9 |
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
10 class TestDot(unittest.TestCase): |
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
11 |
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
12 def test_simple(self): |
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
13 """simple dot product test""" |
7 | 14 |
15 a = [1, 2, 3] | |
16 b = [4, 5, 6] | |
17 expected = 32 | |
5
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
18 |
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
19 if __name__ == '__main__': |
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
20 unittest.main() |