| 728 | |
| 729 | |
| 730 | def test_classify_plugins(): |
| 731 | report_plugin = _loaded( |
| 732 | plugin=_plugin(ep=_ep(name="R", group="flake8.report")), |
| 733 | ) |
| 734 | tree_plugin = _loaded(parameters={"tree": True}) |
| 735 | logical_line_plugin = _loaded(parameters={"logical_line": True}) |
| 736 | physical_line_plugin = _loaded(parameters={"physical_line": True}) |
| 737 | |
| 738 | classified = finder._classify_plugins( |
| 739 | [ |
| 740 | report_plugin, |
| 741 | tree_plugin, |
| 742 | logical_line_plugin, |
| 743 | physical_line_plugin, |
| 744 | ], |
| 745 | finder.PluginOptions.blank(), |
| 746 | ) |
| 747 | |
| 748 | assert classified == finder.Plugins( |
| 749 | checkers=finder.Checkers( |
| 750 | tree=[tree_plugin], |
| 751 | logical_line=[logical_line_plugin], |
| 752 | physical_line=[physical_line_plugin], |
| 753 | ), |
| 754 | reporters={"R": report_plugin}, |
| 755 | disabled=[], |
| 756 | ) |
| 757 | |
| 758 | |
| 759 | def test_classify_plugins_enable_a_disabled_plugin(): |