Robert Collins wrote:
> Its actually pretty precise - it has to raise AssertionError : there are
> three possibly behaviours:
> - the predicate works -> test failure
> - the predicate raises AssertionError -> test pass
> - the predicate raises some other exception -> test failure
>
> -Rob
So that is true, except you write the test as 'assertEqual, 20' # fails
Which means that it could be 30, or it could be 100. When it often
should be failing in a known way. I think you can turn it around as
"assertNotEqual, 52". Though I had to think about it for a while, which
shows it isn't just obvious.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robert Collins wrote:
> Its actually pretty precise - it has to raise AssertionError : there are
> three possibly behaviours:
> - the predicate works -> test failure
> - the predicate raises AssertionError -> test pass
> - the predicate raises some other exception -> test failure
>
> -Rob
So that is true, except you write the test as 'assertEqual, 20' # fails
Which means that it could be 30, or it could be 100. When it often
should be failing in a known way. I think you can turn it around as
"assertNotEqual, 52". Though I had to think about it for a while, which
shows it isn't just obvious.
John
=:->
-----BEGIN PGP SIGNATURE----- enigmail. mozdev. org/
pt/cACgkQJdeBCY SNAAOUSwCeJZS2h eN4ZK0chKYVAXN/ Zye5 DSFn6PWhl7B/ Rb9kXZ
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAks
RmgAoNG44xgHx+
=4Kc+
-----END PGP SIGNATURE-----