summaryrefslogtreecommitdiff
path: root/pylint/test/extensions/test_check_docs_utils.py
diff options
context:
space:
mode:
authorDerek Gustafson <degustaf@gmail.com>2016-12-02 17:09:18 +0000
committerDerek Gustafson <degustaf@gmail.com>2016-12-06 15:49:30 +0000
commit8dfe19525426b57d969f08848b711325362cb115 (patch)
tree5d32c8a140e02f4dd642282ab1780b76c9ac43b4 /pylint/test/extensions/test_check_docs_utils.py
parentdcebae55d3b3246078658cd3a2f100f80a8cff32 (diff)
downloadpylint-git-8dfe19525426b57d969f08848b711325362cb115.tar.gz
Switch test runner from unnittest to pytest.
Diffstat (limited to 'pylint/test/extensions/test_check_docs_utils.py')
-rw-r--r--pylint/test/extensions/test_check_docs_utils.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/pylint/test/extensions/test_check_docs_utils.py b/pylint/test/extensions/test_check_docs_utils.py
index d1ea4b686..362ef35e8 100644
--- a/pylint/test/extensions/test_check_docs_utils.py
+++ b/pylint/test/extensions/test_check_docs_utils.py
@@ -22,11 +22,11 @@ class SpaceIndentationTest(unittest.TestCase):
"""Tests for pylint_plugin.ParamDocChecker"""
def test_space_indentation(self):
- self.assertEqual(utils.space_indentation('abc'), 0)
- self.assertEqual(utils.space_indentation(''), 0)
- self.assertEqual(utils.space_indentation(' abc'), 2)
- self.assertEqual(utils.space_indentation('\n abc'), 0)
- self.assertEqual(utils.space_indentation(' \n abc'), 3)
+ assert utils.space_indentation('abc') == 0
+ assert utils.space_indentation('') == 0
+ assert utils.space_indentation(' abc') == 2
+ assert utils.space_indentation('\n abc') == 0
+ assert utils.space_indentation(' \n abc') == 3
class PossibleExcTypesText(unittest.TestCase):
def test_exception_class(self):
@@ -36,7 +36,7 @@ class PossibleExcTypesText(unittest.TestCase):
''')
found = utils.possible_exc_types(raise_node)
expected = set(["NotImplementedError"])
- self.assertEqual(found, expected)
+ assert found == expected
def test_exception_instance(self):
raise_node = astroid.extract_node('''
@@ -45,7 +45,7 @@ class PossibleExcTypesText(unittest.TestCase):
''')
found = utils.possible_exc_types(raise_node)
expected = set(["NotImplementedError"])
- self.assertEqual(found, expected)
+ assert found == expected
def test_rethrow(self):
raise_node = astroid.extract_node('''
@@ -57,7 +57,7 @@ class PossibleExcTypesText(unittest.TestCase):
''')
found = utils.possible_exc_types(raise_node)
expected = set(["RuntimeError"])
- self.assertEqual(found, expected)
+ assert found == expected
def test_nested_in_if_rethrow(self):
raise_node = astroid.extract_node('''
@@ -70,7 +70,7 @@ class PossibleExcTypesText(unittest.TestCase):
''')
found = utils.possible_exc_types(raise_node)
expected = set(["RuntimeError"])
- self.assertEqual(found, expected)
+ assert found == expected
def test_nested_in_try(self):
raise_node = astroid.extract_node('''
@@ -86,7 +86,7 @@ class PossibleExcTypesText(unittest.TestCase):
''')
found = utils.possible_exc_types(raise_node)
expected = set(["RuntimeError"])
- self.assertEqual(found, expected)
+ assert found == expected
def test_nested_in_try_except(self):
raise_node = astroid.extract_node('''
@@ -101,7 +101,7 @@ class PossibleExcTypesText(unittest.TestCase):
''')
found = utils.possible_exc_types(raise_node)
expected = set(["NameError"])
- self.assertEqual(found, expected)
+ assert found == expected
def test_no_rethrow_types(self):
raise_node = astroid.extract_node('''
@@ -113,7 +113,7 @@ class PossibleExcTypesText(unittest.TestCase):
''')
found = utils.possible_exc_types(raise_node)
expected = set()
- self.assertEqual(found, expected)
+ assert found == expected
def test_multiple_rethrow_types(self):
raise_node = astroid.extract_node('''
@@ -125,7 +125,7 @@ class PossibleExcTypesText(unittest.TestCase):
''')
found = utils.possible_exc_types(raise_node)
expected = set(["RuntimeError", "ValueError"])
- self.assertEqual(found, expected)
+ assert found == expected
def test_ignores_uninferable_type(self):
raise_node = astroid.extract_node('''
@@ -138,7 +138,7 @@ class PossibleExcTypesText(unittest.TestCase):
''')
found = utils.possible_exc_types(raise_node)
expected = set()
- self.assertEqual(found, expected)
+ assert found == expected
if __name__ == '__main__':
unittest.main()