Implement tests.
This commit is contained in:
23
tests/test_audage.py
Normal file
23
tests/test_audage.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import unittest
|
||||
|
||||
from AuDaGe.audage import AuDaGeFrame
|
||||
|
||||
class TestAuDaGeFrame(unittest.TestCase):
|
||||
def test_init(self):
|
||||
valid_adf = AuDaGeFrame({
|
||||
"name": ["a", "b", "c"],
|
||||
"type": ["d", "e", "f"],
|
||||
"address": [1, 2, 3],
|
||||
"comment": ["g", "h", "i"]
|
||||
})
|
||||
self.assertTrue(valid_adf.is_valid())
|
||||
invalid_adf = AuDaGeFrame({
|
||||
"name": ["a", "b", "c"],
|
||||
# "type": ["d", "e", "f"],
|
||||
"address": [1, 2, 3],
|
||||
"comment": ["g", "h", "i"]
|
||||
})
|
||||
self.assertFalse(invalid_adf.is_valid())
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main(failfast=True)
|
||||
Reference in New Issue
Block a user