Contact: fumanchu@aminus.org

Log in as guest/geniusql to create tickets

Changeset 26

Show
Ignore:
Timestamp:
03/10/07 18:36:22
Author:
fumanchu
Message:

New --memory arg to test_sqlite.py

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/geniusql/test/test_sqlite.py

    r25 r26  
    1515        import _sqlite 
    1616    except ImportError: 
    17         def run(): 
     17        def run(memonly=False): 
    1818            import warnings 
    1919            warnings.warn("The _sqlite module could not be imported. " 
     
    2424    opts = {} 
    2525     
    26     def run(): 
     26    def run(memonly=False): 
    2727        import zoo_fixture 
    28         # Isolate schema changes from one test to the next. 
    29         reload(zoo_fixture) 
    30         zoo_fixture.run(DB_class, dbpath, opts) 
    3128         
    32         print 
    33         print "Testing SQLite with 'Perfect Dates'" 
    34         opts['adaptertosql.perfect_dates'] = True 
    35         opts['typeadapter.perfect_dates'] = True 
    36         reload(zoo_fixture) 
    37         zoo_fixture.run(DB_class, dbpath, opts) 
    38         opts['adaptertosql.perfect_dates'] = False 
    39         opts['typeadapter.perfect_dates'] = False 
     29        if not memonly: 
     30            # Isolate schema changes from one test to the next. 
     31            reload(zoo_fixture) 
     32            zoo_fixture.run(DB_class, dbpath, opts) 
     33             
     34            print 
     35            print "Testing SQLite with 'Perfect Dates'" 
     36            opts['adaptertosql.perfect_dates'] = True 
     37            opts['typeadapter.perfect_dates'] = True 
     38            reload(zoo_fixture) 
     39            zoo_fixture.run(DB_class, dbpath, opts) 
     40            opts['adaptertosql.perfect_dates'] = False 
     41            opts['typeadapter.perfect_dates'] = False 
    4042         
    4143        print 
     
    4547 
    4648if __name__ == "__main__": 
    47     run() 
     49    import sys 
     50    if "--memory" in sys.argv: 
     51        run(memonly=True) 
     52    else: 
     53        run()