Convert ``test_datashape.py`` to unittest