[cctbxbb] [git/cctbx] master: rename test files, remove them from run_tests (23a4a6fe4)
Graeme.Winter at diamond.ac.uk
Graeme.Winter at diamond.ac.uk
Fri Mar 2 23:35:39 PST 2018
I see your point here - as usage examples the tests we have work (though from experience it is not always obvious what the objects etc, passed in are…) however using them reliably in a production environment is less helpful
The 10 years we didn’t use regression testing argument is a weak one - I agree that the test framework did not exist at the start, but it exists now and is “pythonic” - and allows people who are using cctbx for infrastructure (like making beamlines work) to have much more robust testing where the outcomes are well determined. It also means that people coming to cctbx new from other Python projects feel more at home (libtbx etc can be a little hostile to the new developer)
Best wishes Graeme
> On 3 Mar 2018, at 07:13, Pavel Afonine <pafonine at lbl.gov> wrote:
> 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. """
> assert approx_equal(result, 4., 1.e-6)
> if(__name__ == "__main__"):
> 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,
> 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?
>>> 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
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
More information about the cctbxbb