|
Revision 127
(checked in by fumanchu, 3 years ago)
|
Initial implementation of #16 (schema changes). See modeling.html ("Managing Schema Changes") for summary. Oh, and Unit has a new remove_property method.
|
- Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 |
try: |
|---|
| 2 |
import _mysql |
|---|
| 3 |
except ImportError: |
|---|
| 4 |
def run(): |
|---|
| 5 |
import warnings |
|---|
| 6 |
warnings.warn("The _mysql module could not be imported. " |
|---|
| 7 |
"The test for MySQL will not be run.") |
|---|
| 8 |
else: |
|---|
| 9 |
opts = {"host": "localhost", |
|---|
| 10 |
"db": "dejavu_test", |
|---|
| 11 |
"user": "root", |
|---|
| 12 |
"passwd": "", |
|---|
| 13 |
} |
|---|
| 14 |
if opts['passwd'] == "": |
|---|
| 15 |
opts['passwd'] = raw_input("Enter the password for the MySQL '%s' user:" |
|---|
| 16 |
% opts['user']) |
|---|
| 17 |
SM_class = "dejavu.storage.storemysql.StorageManagerMySQL" |
|---|
| 18 |
|
|---|
| 19 |
def run(): |
|---|
| 20 |
import zoo_fixture |
|---|
| 21 |
|
|---|
| 22 |
reload(zoo_fixture) |
|---|
| 23 |
zoo_fixture.init() |
|---|
| 24 |
zoo_fixture.run(SM_class, opts) |
|---|
| 25 |
|
|---|
| 26 |
if __name__ == "__main__": |
|---|
| 27 |
run() |
|---|