Skip to content

Commit 4bf5187

Browse files
committed
Wrote additional tests
1 parent 5f80ba6 commit 4bf5187

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed
0 Bytes
Binary file not shown.
217 Bytes
Binary file not shown.
-63 Bytes
Binary file not shown.

App/tests.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,14 @@ def testclasstoemotion(self):
4343
"""
4444
Ensure classtoemotion function is converting int to labels properly
4545
"""
46-
pred = 0
47-
self.assertEqual(Predict.classtoemotion(pred), "neutral")
46+
self.assertEqual(Predict.classtoemotion(0), "neutral")
47+
self.assertEqual(Predict.classtoemotion(1), "calm")
48+
self.assertEqual(Predict.classtoemotion(2), "happy")
49+
self.assertEqual(Predict.classtoemotion(3), "sad")
50+
self.assertEqual(Predict.classtoemotion(4), "angry")
51+
self.assertEqual(Predict.classtoemotion(5), "fearful")
52+
self.assertEqual(Predict.classtoemotion(6), "disgust")
53+
self.assertEqual(Predict.classtoemotion(7), "surprised")
4854

4955

5056
class TestTemplates(TestCase):

0 commit comments

Comments
 (0)