Changeset 1752:1d6514ef2206


Ignore:
Timestamp:
Jan 1, 2019, 2:50:33 PM (2 years ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Explain specific error text

If we used `result=ftplib.error_perm`, `chmod` would only see a
generic `FTPOSError`, not a `CommandNotImplementedError` (which
derives from `FTPOSError`).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/test_host.py

    r1751 r1752  
    266266          Call(method_name="cwd", result=None, expected_args=("/",)),
    267267          Call(method_name="cwd", result=None, expected_args=("/",)),
     268          # `FTPHost.chmod` only raises a `CommandNotImplementedError` when
     269          # the exception text of the `ftplib.error_perm` starts with "502".
    268270          Call(method_name="voidcmd",
    269271               result=ftplib.error_perm("502 command not implemented"),
     
    272274          Call(method_name="cwd", result=None, expected_args=("/",)),
    273275          Call(method_name="cwd", result=None, expected_args=("/",)),
     276          # `FTPHost.chmod` only raises a `CommandNotImplementedError` when
     277          # the exception text of the `ftplib.error_perm` starts with "502".
    274278          Call(method_name="voidcmd",
    275279               result=ftplib.error_perm("502 command not implemented"),
Note: See TracChangeset for help on using the changeset viewer.