[cctbxbb] [git/cctbx] master: rename test files, remove them from run_tests (23a4a6fe4)
Pavel Afonine
pafonine at lbl.gov
Fri Mar 2 23:13:55 PST 2018
I'd say at least because:
- the first 10+ years of CCTBX did not use pytest. AFAIK, the first
attempt was by our postdoc Youval Dar back in 2015 (correct me if I'm
wrong). I feel adding different testing styles are only to make the
code-base inconsistent (very much like mixing flex and np arrays isn't
cool, in my opinion!).
- originally tests were considered as simple usage examples for
functionalities they are testing; this is because writing and (most
importantly!) maintaining the proper documentation was not provisioned.
A simple test like
def exercise():
""" Make sure 2*2 is 4. """
x=2.
result=x*x
assert approx_equal(result, 4., 1.e-6)
if(__name__ == "__main__"):
exercise()
print "OK"
is much easier to grasp rather than the same cluttered with the stuff
(that, to add to the trouble, one needs to learn in the first place!).
All the best,
Pavel
On 3/3/18 14:36, Graeme.Winter at diamond.ac.uk wrote:
> What’s bad about pytest?
>
>
>
>> On 3 Mar 2018, at 02:26, Pavel Afonine <pafonine at lbl.gov> wrote:
>>
>> Just to make sure: you are converting to use pytest this particular codes (fable), correct?
>> Pavel
>> P.S.: I'm allergic to pytest.
>>
>>
>> On 3/3/18 07:46, CCTBX commit wrote:
>>> This in preparation for pytestification.
>> _______________________________________________
>> cctbxbb mailing list
>> cctbxbb at phenix-online.org
>> http://phenix-online.org/mailman/listinfo/cctbxbb
>
More information about the cctbxbb
mailing list