Add tests for astype context manager
Document astype method