Tests that a derived class inherits fluent methods which return instances of derived class when inherited.
(self)
| 241 | self.saveModel(s) |
| 242 | |
| 243 | def testFluentMethodInheritance(self): |
| 244 | """ |
| 245 | Tests that a derived class inherits fluent methods which return |
| 246 | instances of derived class when inherited. |
| 247 | """ |
| 248 | |
| 249 | class ExtendedWorkplane(Workplane): |
| 250 | def nonExistentInWorkplane(self): |
| 251 | pass |
| 252 | |
| 253 | # Call an inherited fluent method: |
| 254 | wp = ExtendedWorkplane("XY").moveTo(1, 2) |
| 255 | |
| 256 | # Verify that the inherited method returned an instance of the derived |
| 257 | # class: |
| 258 | self.assertEqual(type(wp), ExtendedWorkplane) |
| 259 | |
| 260 | # The following is redundant, but can make the use case clearer. |
| 261 | # This must not raise an AttributeError: |
| 262 | wp.nonExistentInWorkplane() |
| 263 | |
| 264 | def testPointList(self): |
| 265 | """ |
nothing calls this directly
no test coverage detected