tests/delayedquery.py
changeset 22 680631f35d83
parent 21 26209e9984b2
child 78 64c62ac8f65d
equal deleted inserted replaced
21:26209e9984b2 22:680631f35d83
     1 #!/usr/bin/env python3
     1 #!/usr/bin/env python3
     2 
     2 
     3 import logging
     3 import logging
     4 import time
     4 import time
     5 
     5 
       
     6 from config import Config
     6 from pgtoolkit import pgmanager
     7 from pgtoolkit import pgmanager
     7 from pgtoolkit.delayedquery import DelayedQuery
     8 from pgtoolkit.delayedquery import DelayedQuery
     8 
       
     9 
       
    10 class Config(dict):
       
    11     def __init__(self, fname):
       
    12         data = open(fname).read()
       
    13         exec(data, dict(), self)
       
    14 
     9 
    15 
    10 
    16 if __name__ == '__main__':
    11 if __name__ == '__main__':
    17     cfg = Config('tests.conf')
    12     cfg = Config('tests.conf')
    18     
    13