简体   繁体   中英

In SQLAlchemy-migrate, what's the point of using “test”?

Why use py manage.py test ?

What's the point? It creates the table anyway... if I wanted to test it, then I wouldn't want it to create the actual table!!!

Test is meant to perform both the upgrade and the downgrade steps. You want to verify that the application is usable in both states. So the idea would be to upgrade, run tests, downgrade, run tests, and verify you don't break things.

If the test run fails, it gives you a chance to clean it up, reset, and try again. Usually, I'd say that the test run must completely cleanly before the migration is considered "good" and able to be committed to the code base.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM