# Path: test.py
# def run_tests():


import unittest
import sys
import gc
import gauged
from ConfigParser import ConfigParser
from test import (TestGauged, TestStructures, TestLRU, TestDriver,
                  TestDSN, TestResult)
quick_tests = '--quick' in argv
# Stop and dump a trace when a test driver fails
raise_on_error = '--raise' in argv
# Run the tests forever (to check for leaks)
run_forever = '--forever' in argv
# Run driver tests only
drivers_only = '--drivers' in argv
# Increase test runner verbosity
verbose = '--verbose' in argv

if quick_tests:
    test_drivers = test_drivers[:1]


def run_tests():
    suite = unittest.TestSuite()

    test_class = driver = None

    # Test each driver in gauged/drivers. We need to dynamically subclass
    # the TestDriver class here - the unittest module doesn't allow us to
    # use __init__ to pass in driver arguments or a driver instance
    for driver, dsn in test_drivers:
        try:
            gauged_instance = gauged.Gauged(dsn)
            # Empty the data store
            gauged_instance.driver.drop_schema()
            gauged_instance.sync()
            gauged_instance.driver.create_schema()
            # Test the driver class

# Path: test.py
# def run_tests():


# Path: test.py
import unittest
import sys
import gc
import gauged
from ConfigParser import ConfigParser
from test import (TestGauged, TestStructures, TestLRU, TestDriver,
                  TestDSN, TestResult)

quick_tests = '--quick' in argv
# Stop and dump a trace when a test driver fails
raise_on_error = '--raise' in argv
# Run the tests forever (to check for leaks)
run_forever = '--forever' in argv
# Run driver tests only
drivers_only = '--drivers' in argv
# Increase test runner verbosity
verbose = '--verbose' in argv

if quick_tests:
    test_drivers = test_drivers[:1]


def run_tests():
    suite = unittest.TestSuite()

    test_class = driver = None

    # Test each driver in gauged/drivers. We need to dynamically subclass
    # the TestDriver class here - the unittest module doesn't allow us to
    # use __init__ to pass in driver arguments or a driver instance
    for driver, dsn in test_drivers:
        try:
            gauged_instance = gauged.Gauged(dsn)
            # Empty the data store
            gauged_instance.driver.drop_schema()
            gauged_instance.sync()
            gauged_instance.driver.create_schema()
            # Test the driver class

            test_class = type('Test%s' % driver, (TestDriver,), {})