Update test_write.py