diff options
Diffstat (limited to 'pylint/test/functional')
| -rw-r--r-- | pylint/test/functional/deprecated_methods_py2.py | 13 | ||||
| -rw-r--r-- | pylint/test/functional/deprecated_methods_py2.txt | 13 |
2 files changed, 21 insertions, 5 deletions
diff --git a/pylint/test/functional/deprecated_methods_py2.py b/pylint/test/functional/deprecated_methods_py2.py index ceba1e4f9..08f80aeba 100644 --- a/pylint/test/functional/deprecated_methods_py2.py +++ b/pylint/test/functional/deprecated_methods_py2.py @@ -1,9 +1,20 @@ """ Functional test for deprecated methods in Python 2 """ -# pylint: disable=no-member +# pylint: disable=no-member,missing-docstring import os import xml.etree.ElementTree +import unittest os.popen2('') # [deprecated-method] os.popen3('') # [deprecated-method] os.popen4('') # [deprecated-method] xml.etree.ElementTree.Element('elem').getchildren() # [deprecated-method] + + +class Tests(unittest.TestCase): + + def test_foo(self): + self.assertEquals(2 + 2, 4) # [deprecated-method] + self.assertNotEquals(2 + 2, 4) # [deprecated-method] + self.assertAlmostEquals(2 + 2, 4) # [deprecated-method] + self.assertNotAlmostEquals(2 + 2, 4) # [deprecated-method] + self.assert_("abc" == "2") # [deprecated-method] diff --git a/pylint/test/functional/deprecated_methods_py2.txt b/pylint/test/functional/deprecated_methods_py2.txt index e1038185c..a09f4bd0a 100644 --- a/pylint/test/functional/deprecated_methods_py2.txt +++ b/pylint/test/functional/deprecated_methods_py2.txt @@ -1,4 +1,9 @@ -deprecated-method:6::Using deprecated method popen2() -deprecated-method:7::Using deprecated method popen3() -deprecated-method:8::Using deprecated method popen4() -deprecated-method:9::Using deprecated method getchildren() +deprecated-method:7::Using deprecated method popen2() +deprecated-method:8::Using deprecated method popen3() +deprecated-method:9::Using deprecated method popen4() +deprecated-method:10::Using deprecated method getchildren() +deprecated-method:16:Tests.test_foo:Using deprecated method assertEquals() +deprecated-method:17:Tests.test_foo:Using deprecated method assertNotEquals() +deprecated-method:18:Tests.test_foo:Using deprecated method assertAlmostEquals() +deprecated-method:19:Tests.test_foo:Using deprecated method assertNotAlmostEquals() +deprecated-method:20:Tests.test_foo:Using deprecated method assert_() |
