

@mock.patch('pkg_resources.iter_entry_points')
def test_entry_points(self, iep):

    def function():
        pass

    def entry_points(group, *args):
        (yield function)
    iep.side_effect = entry_points
    collector = begin.subcommands.Collector()
    collector.load_plugins('entry.point')
    iep.assertEqual(list(collector.commands()), [function])

dataset/ETHPy150Open aliles/begins/tests/test_subcommands.py TestSubCommand.test_entry_points/VarMisuse@72/98 `self`->`iep`