Coverage for tests/test_cmpFrame.py: 41%
18 statements
« prev ^ index » next coverage.py v6.4.4, created at 2022-09-15 09:29 +0000
« prev ^ index » next coverage.py v6.4.4, created at 2022-09-15 09:29 +0000
1import unittest
3import astshim as ast
4from astshim.test import MappingTestCase
7class TestCmpFrame(MappingTestCase):
9 def test_CmpFrame(self):
10 frame1 = ast.Frame(2, "label(1)=a, label(2)=b")
11 frame2 = ast.Frame(1, "label(1)=c")
12 cmpframe = ast.CmpFrame(frame1, frame2)
13 # adding to a CmpFrame increases by 1
14 self.assertEqual(frame1.getRefCount(), 2)
15 # adding to a CmpFrame increases by 1
16 self.assertEqual(frame2.getRefCount(), 2)
18 self.assertEqual(cmpframe.nAxes, 3)
19 self.assertEqual(cmpframe.getLabel(1), "a")
20 self.assertEqual(cmpframe.getLabel(2), "b")
21 self.assertEqual(cmpframe.getLabel(3), "c")
23 self.checkPersistence(cmpframe)
24 self.checkMemoryForCompoundObject(frame1, frame2, cmpframe, isSeries=None)
27if __name__ == "__main__": 27 ↛ 28line 27 didn't jump to line 28, because the condition on line 27 was never true
28 unittest.main()