Check the list with extensions of paired nodes. :param varPairs: list with extensions of paired nodes. :type varPairs: list :return: number of errors :rtype: int
(self, pairExt)
| 589 | return |
| 590 | |
| 591 | def checkPairExt(self, pairExt): |
| 592 | """ |
| 593 | Check the list with extensions of paired nodes. |
| 594 | |
| 595 | :param varPairs: list with extensions of paired nodes. |
| 596 | |
| 597 | :type varPairs: list |
| 598 | |
| 599 | :return: number of errors |
| 600 | :rtype: int |
| 601 | """ |
| 602 | errors = 0 |
| 603 | if type(pairExt) != list and len(pairExt) != 2: |
| 604 | print("Error: expected a list with two extensions for nodes or elements.") |
| 605 | errors += 1 |
| 606 | if type(pairExt[0]) != str or type(pairExt[1]) != str: |
| 607 | print("Error: pair extensions for nodes and elements should be of type 'str'.") |
| 608 | errors += 1 |
| 609 | if len(pairExt[0]) != len(pairExt[1]): |
| 610 | print("Error: pair extensions should have the same length.") |
| 611 | errors += 1 |
| 612 | if errors == 0: |
| 613 | self.pairExt = pairExt |
| 614 | return errors |
| 615 | |
| 616 | def setPairedCircuits(self, cirPairs): |
| 617 | """ |
no outgoing calls
no test coverage detected