def test_register_extensions(self): with mock.patch('pycodestyle.register_check') as register_check: registered_exts = engine._register_extensions() self.assertTrue(isinstance(registered_exts[0], util.OrderedSet)) self.assertTrue(len(registered_exts[0]) > 0) for i in registered_exts[1:]: self.assertTrue(isinstance(i, list)) self.assertTrue(register_check.called)
def test_register_extensions(self): with mock.patch("pep8.register_check") as register_check: registered_exts = engine._register_extensions() self.assertTrue(isinstance(registered_exts[0], util.OrderedSet)) self.assertTrue(len(registered_exts[0]) > 0) for i in registered_exts[1:]: self.assertTrue(isinstance(i, list)) register_check.assert_called()
def setUpClass(cls): flake8_ext_data = engine._register_extensions() flake8_ext_list = flake8_ext_data[0] assert flake8_ext_list flake8_ext_names = [item[0] for item in flake8_ext_list] assert 'flake8-putty' in flake8_ext_names