tests/subfiles.py

changeset 23
1b9645b7ddb0
child 24
f8080ffceaa9
equal deleted inserted replaced
22:9bb00170780b 23:1b9645b7ddb0
1 from testsuite import error
2
3 def determinant_test(model):
4 yield from [
5 error(subfile_reference, 'zero-determinant')
6 for subfile_reference in model.subfile_references
7 if abs(subfile_reference.matrix.determinant() - 0) < 1e-15
8 ]
9
10 manifest = {
11 'tests': {
12 'determinant': determinant_test,
13 },
14 'messages': {
15 'zero-determinant': 'matrix determinant is zero '
16 '(row or column all zero)',
17 },
18 }

mercurial