I just had the code:
assert ds.rank==1
which would always fail because ds.rank is a function, not the integer rank. It would be nice to have a document which enumerates these sort of pitfalls, and maybe detect them in the editor.