Tests help on builtin object which have no child classes. When running help() on a builtin class which has no child classes, it should not contain any "Built-in subclasses" section. For example: >>> help(ZeroDivisionError) Help on class ZeroDivisionError in module
(self)
| 656 | self.assertNotIn('ZeroDivisionError', text) |
| 657 | |
| 658 | def test_builtin_no_child(self): |
| 659 | """Tests help on builtin object which have no child classes. |
| 660 | |
| 661 | When running help() on a builtin class which has no child classes, it |
| 662 | should not contain any "Built-in subclasses" section. For example: |
| 663 | |
| 664 | >>> help(ZeroDivisionError) |
| 665 | |
| 666 | Help on class ZeroDivisionError in module builtins: |
| 667 | |
| 668 | class ZeroDivisionError(ArithmeticError) |
| 669 | | Second argument to a division or modulo operation was zero. |
| 670 | | |
| 671 | | Method resolution order: |
| 672 | | ZeroDivisionError |
| 673 | | ArithmeticError |
| 674 | | Exception |
| 675 | | BaseException |
| 676 | | object |
| 677 | | |
| 678 | | Methods defined here: |
| 679 | ... |
| 680 | """ |
| 681 | doc = pydoc.TextDoc() |
| 682 | text = doc.docclass(ZeroDivisionError) |
| 683 | # Testing that the subclasses section does not appear |
| 684 | self.assertNotIn('Built-in subclasses', text) |
| 685 | |
| 686 | def test_builtin_on_metaclasses(self): |
| 687 | """Tests help on metaclasses. |
nothing calls this directly
no test coverage detected