libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pquentin <...@git.apache.org>
Subject [GitHub] libcloud pull request #1084: test_s3: Use pytest.raises helper
Date Wed, 05 Jul 2017 13:09:58 GMT
GitHub user pquentin opened a pull request:

    https://github.com/apache/libcloud/pull/1084

    test_s3: Use pytest.raises helper

    ## Use pytest.raises helper in test_s3.py
    
    ### Description
    
    Nothing fancy, but I think this makes the tests much more easier to read. There are some
`try: ... finally: ...` left that could be removed using monkeypatch, but we would have to
stop using `unittest.TestCase`, see https://stackoverflow.com/questions/42332030/pytest-monkeypatch-setattr-inside-of-test-class-method
    
    ### Status
    
    - done, ready for review
    
    ### Checklist (tick everything that applies)
    
    - [x] [Code linting](http://libcloud.readthedocs.org/en/latest/development.html#code-style-guide)
(required, can be done after the PR checks)
    - [x] [Tests](http://libcloud.readthedocs.org/en/latest/testing.html)
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/pquentin/libcloud patch-4

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/libcloud/pull/1084.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1084
    
----
commit c18989446cca7276197b643219afda5938bf13d7
Author: Quentin Pradet <quentin@clustree.com>
Date:   2017-07-05T13:00:41Z

    test_s3: Use pytest.raises helper

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message