unit-threaded v1.0.0

Russel Winder russel at winder.org.uk
Mon Jun 1 09:08:01 UTC 2020


On Mon, 2020-06-01 at 08:41 +0000, Atila Neves via Digitalmars-d-announce
wrote:
[…]
> Out of curiosity, what is the difference for you between:
> 
> testFoo() { /* ... */ }
> 
> and:
> 
> @("foo")
> unittest { /* ... */ }

Primarily consistency with the way all other unit test frameworks which are
based on test functions – I am not a fan of class-based unit tests hence using
pytest in favour of unittest in Python. Using functions just feels more
normal.

Secondarily lack of understanding of the scope rules of multiple unittest
blocks.

In the end though I use whatever is provided. So if functions are for the
chop, I will switch to using labelled unittest blocks.

-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-announce/attachments/20200601/42ddf7b6/attachment.sig>


More information about the Digitalmars-d-announce mailing list