diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-03-07 21:56:44 +0100 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-03-07 22:59:36 +0100 |
commit | 7e4c3fa6193441a6bbf91c464138fc950d3e9e62 (patch) | |
tree | fd7ebe36a939a3dc51a43e82d7655150b7a7f300 /tests/input | |
parent | e1a7f0afa8f8a55587b99eb6a3fde7d0510e6b49 (diff) | |
download | pylint-git-7e4c3fa6193441a6bbf91c464138fc950d3e9e62.tar.gz |
Migrate func_noerror_new_style_class_py_30.py to new functional tests
Diffstat (limited to 'tests/input')
-rw-r--r-- | tests/input/func_noerror_new_style_class_py_30.py | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/tests/input/func_noerror_new_style_class_py_30.py b/tests/input/func_noerror_new_style_class_py_30.py deleted file mode 100644 index a33ae19f4..000000000 --- a/tests/input/func_noerror_new_style_class_py_30.py +++ /dev/null @@ -1,45 +0,0 @@ -"""check builtin data descriptors such as mode and name attributes -on a file are correctly handled - -bug notified by Pierre Rouleau on 2005-04-24 -""" -from __future__ import print_function -__revision__ = None - -class File(file): # pylint: disable=file-builtin - """ Testing new-style class inheritance from file""" - - # - def __init__(self, name, mode="r", buffering=-1, verbose=False): - """Constructor""" - - self.was_modified = False - self.verbose = verbose - super(File, self).__init__(name, mode, buffering) - if self.verbose: - print("File %s is opened. The mode is: %s" % (self.name, - self.mode)) - - # - def write(self, a_string): - """ Write a string to the file.""" - - super(File, self).write(a_string) - self.was_modified = True - - # - def writelines(self, sequence): - """ Write a sequence of strings to the file. """ - - super(File, self).writelines(sequence) - self.was_modified = True - - # - def close(self): - """Close the file.""" - - if self.verbose: - print("Closing file %s" % self.name) - - super(File, self).close() - self.was_modified = False |