dlaxalde/scipy — comment on commit 5e82f9217a95580d9895149ab234a50d7e4919e8
File:  line 0
By WarrenWeckesser:

Fuzz tests with random data have their place, but for a function like this, you should write basic, deterministic tests first. E.g.

```
def test_diags_one_diagonal(self):
d = np.array([1,2,3,4])
for k in range(-5, 6):
assert_equal(construct.diags(d, k).toarray(), np.diag(d, k))
```
Tests that diags([1,2,3], k) is the same as diags([1,2,3], [k]), and that diags([[1,2,3]], k) is the same as diags([[1,2,3]], [k]) should also be included (since I think that is the intent).