Changeset 1897:f1349dbc8276


Ignore:
Timestamp:
Jan 2, 2020, 8:52:20 PM (3 months ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Remove test for `bytes` exception strings

Assume that for Python 3, ftplib always gives us exception strings
that are of type `str`.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/test_error.py

    r1848 r1897  
    1 # Copyright (C) 2002-2018, Stefan Schwarzer <sschwarzer@sschwarzer.net>
     1# Copyright (C) 2002-2020, Stefan Schwarzer <sschwarzer@sschwarzer.net>
    22# and ftputil contributors (see `doc/contributors.txt`)
    33# See the file LICENSE for licensing terms.
     
    4343        del exc_info
    4444
    45     def test_ftplib_error_to_ftp_os_error_non_ascii_server_message(self):
    46         """
    47         Test that we don't get a `UnicodeDecodeError` if the server
    48         sends a message containing non-ASCII characters.
    49         """
    50         # See ticket #77.
    51         message = ftputil.tool.as_bytes("Não é possível criar um arquivo já existente.")
    52         with pytest.raises(ftputil.error.PermanentError):
    53             with ftputil.error.ftplib_error_to_ftp_os_error:
    54                 raise ftplib.error_perm(message)
    55 
    5645    def test_ftplib_error_to_ftp_io_error(self):
    5746        """
Note: See TracChangeset for help on using the changeset viewer.