|
Revision 324
(checked in by lakin, 2 months ago)
|
printing the warning when not running the mysql tests.
|
- Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 |
from geniusql.test import test |
|---|
| 2 |
|
|---|
| 3 |
try: |
|---|
| 4 |
import _mysql |
|---|
| 5 |
except ImportError: |
|---|
| 6 |
import warnings |
|---|
| 7 |
warnings.warn("The _mysql module could not be imported. " |
|---|
| 8 |
"The test for MySQL will not be run.") |
|---|
| 9 |
else: |
|---|
| 10 |
opts = {"host": "localhost", |
|---|
| 11 |
"db": "geniusql_test", |
|---|
| 12 |
"user": "geniusql_test", |
|---|
| 13 |
"passwd": "geniusql_test", |
|---|
| 14 |
} |
|---|
| 15 |
from geniusql.test import zoo_fixture, test |
|---|
| 16 |
|
|---|
| 17 |
db = test.DBConfig('mysql', opts) |
|---|
| 18 |
setUp = db.setUp |
|---|
| 19 |
tearDown = db.tearDown |
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
class Phase1_ZooTests(zoo_fixture.Phase1_ZooTests): |
|---|
| 23 |
pass |
|---|
| 24 |
db.register_db_test_class(Phase1_ZooTests) |
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
class Phase2_ConcurrencyTests(zoo_fixture.Phase2_ConcurrencyTests): |
|---|
| 28 |
pass |
|---|
| 29 |
db.register_db_test_class(Phase2_ConcurrencyTests) |
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
class Phase2_IsolationTests(zoo_fixture.Phase2_IsolationTests): |
|---|
| 33 |
pass |
|---|
| 34 |
db.register_db_test_class(Phase2_IsolationTests) |
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
class Phase2_TransactionTests(zoo_fixture.Phase2_TransactionTests): |
|---|
| 38 |
pass |
|---|
| 39 |
db.register_db_test_class(Phase2_TransactionTests) |
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
class Phase2_ConnectionTests(zoo_fixture.Phase2_ConnectionTests): |
|---|
| 49 |
pass |
|---|
| 50 |
db.register_db_test_class(Phase2_ConnectionTests) |
|---|
| 51 |
|
|---|
| 52 |
|
|---|
| 53 |
class Phase2_SQLInjectionTests(zoo_fixture.Phase2_SQLInjectionTests): |
|---|
| 54 |
pass |
|---|
| 55 |
db.register_db_test_class(Phase2_SQLInjectionTests) |
|---|
| 56 |
|
|---|