> On March 9, 2015, 11:39 p.m., Kevin Sweeney wrote:
> > src/test/python/apache/aurora/client/cli/test_create.py, line 277
> > <https://reviews.apache.org/r/31869/diff/2/?file=889611#file889611line277>
> >
> >     You don't actually need to use the pytest API for this - since we're on 
> > python 2.7 and you have already subclassed `TestCase` you can use 
> > [self.assertRaises](https://docs.python.org/2/library/unittest.html#unittest.TestCase.assertRaises).

I have no skin in this game, but i prefer to conform and minimize the ways of 
doing things.  In this case, `pytest.raises` wins by the numbers:

```
$ grep -RI pytest.raises src/test/python/ | wc -l
69
$ grep -RI assertRaises src/test/python/ | wc -l
6
```


> On March 9, 2015, 11:39 p.m., Kevin Sweeney wrote:
> > src/main/python/apache/aurora/client/base.py, lines 220-221
> > <https://reviews.apache.org/r/31869/diff/2/?file=889607#file889607line220>
> >
> >     To be clear my suggestion was to remove the constructor and leave the 
> > docstring. Overriding a constructor without changing its behavior just adds 
> > noise and is inconsistent with the convention used through most of the 
> > codebase.

Aha, i didn't realize that `message` is a first-class property on 
`BaseException`.  Done.


> On March 9, 2015, 11:39 p.m., Kevin Sweeney wrote:
> > src/main/python/apache/aurora/client/base.py, line 217
> > <https://reviews.apache.org/r/31869/diff/2/?file=889607#file889607line217>
> >
> >     As this is only raised from a single place prefer declaring it there 
> > and matching the convention in [the style 
> > guide](https://github.com/twitter/commons/blob/master/src/python/twitter/common/styleguide.md#best-practices)
> >  (number 6). I don't have a strong opinion on the merits of this practice, 
> > but it is a convention across our code whose change I think is orthogonal 
> > to the purpose of this diff.

Ok, i'll invert this so that `AuroraClientAPI.Error` is caught in 
`CommandLine`.  As we discussed offline, this is a lesser abstraction violation.


- Bill


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/31869/#review75812
-----------------------------------------------------------


On March 9, 2015, 8:39 p.m., Bill Farner wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31869/
> -----------------------------------------------------------
> 
> (Updated March 9, 2015, 8:39 p.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Zameer Manji.
> 
> 
> Bugs: AURORA-1176
>     https://issues.apache.org/jira/browse/AURORA-1176
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> As indicated by some changes in tests - there were legitimate issues hiding 
> behind this catch.  After this change, the client will allow unhandled 
> exceptions to surface in their full glory.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/__init__.py 
> 194629f61192c1d7d5e7064e9226adf26d03e890 
>   src/main/python/apache/aurora/client/base.py 
> d550c8eeed91f0967e281957b71fcefb0b4cf3b8 
>   src/main/python/apache/aurora/client/cli/__init__.py 
> 4d9ef09749e3075b9d9e2ae1db311e60f7bdb4ee 
>   src/main/python/apache/aurora/client/cli/jobs.py 
> 286b2182d5fe25703882f0b367739ad03d6c8fe8 
>   src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
> b855c3c2d74125738d2106e18a9e9b0ebed6ac4b 
>   src/test/python/apache/aurora/client/cli/test_create.py 
> 459d157155f74b6a3d140bcccc85d3b7f0364367 
>   src/test/python/apache/aurora/client/cli/test_kill.py 
> 7aad34a2fe5591937c5bca890751073439e3a1a6 
>   src/test/python/apache/aurora/client/cli/test_supdate.py 
> 1806769426a196793481f948892f5474df8dd665 
>   src/test/python/apache/aurora/client/cli/util.py 
> b65970a2717a1f36767c61e5e09c980b04895f01 
> 
> Diff: https://reviews.apache.org/r/31869/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Bill Farner
> 
>

Reply via email to