def test_empty_disable_list(self): """ This test verifies that a profile can still be loaded if it contains an empty 'pylint.disable' list """ profile = load_profiles('empty_disable_list', self._profile_path) self.assertEqual([], profile.pylint['disable'])
def test_empty_profile(self): """ Verifies that a completely empty profile can still be parsed and have default values """ profile = load_profiles('empty_profile', self._profile_path) self.assertEqual([], profile.pylint['disable'])
def test_empty_profile(self): """ Verifies that a completely empty profile can still be parsed and have default values """ profile = load_profiles('empty_profile', basedir=self._basedir) self.assertEqual([], profile.pylint['disable'])
def test_empty_disable_list(self): """ This test verifies that a profile can still be loaded if it contains an empty 'pylint.disable' list """ profile = load_profiles('empty_disable_list', basedir=self._basedir) self.assertEqual([], profile.pylint['disable'])
def test_disable_tool_inheritance(self): profile = load_profiles('pep8_and_pylint_disabled', self._profile_path) self.assertFalse(profile.is_tool_enabled('pylint')) self.assertFalse(profile.is_tool_enabled('pep8'))
def test_disable_tool(self): profile = load_profiles('pylint_disabled', self._profile_path) self.assertFalse(profile.is_tool_enabled('pylint')) self.assertTrue(profile.is_tool_enabled('pep8') is None)
def test_ignores(self): profile = load_profiles('ignores', self._profile_path) self.assertEqual(['^tests/', '/migrations/'].sort(), profile.ignore.sort())
def test_inheritance(self): profile = load_profiles('inherittest3', self._profile_path) disable = profile.pylint['disable'] disable.sort() self.assertEqual(['I0001', 'I0002', 'I0003'], disable)
def __init__(self, profile_names): self.profile = load_profiles(profile_names) self.name = 'profiles:%s' % ','.join(profile_names)
def test_disable_tool(self): profile = load_profiles('pylint_disabled', basedir=self._basedir) self.assertFalse(profile.is_tool_enabled('pylint')) self.assertTrue(profile.is_tool_enabled('pep8'))
def test_ignores(self): profile = load_profiles('ignores', basedir=self._basedir) self.assertEqual(['^tests/', '/migrations/'].sort(), profile.ignore.sort())
def test_disable_tool_inheritance(self): profile = load_profiles('pep8_and_pylint_disabled', basedir=self._basedir) self.assertFalse(profile.is_tool_enabled('pylint')) self.assertFalse(profile.is_tool_enabled('pep8'))
def test_inheritance(self): profile = load_profiles('inherittest3', basedir=self._basedir) disable = profile.pylint['disable'] disable.sort() self.assertEqual(['I0001', 'I0002', 'I0003'], disable)