tests/config.py
author Radek Brich <radek.brich@devl.cz>
Wed, 26 Sep 2012 16:20:26 +0200
changeset 42 9e3775460792
parent 37 5b0eb4b11940
child 49 08e4dfe1b0cb
permissions -rw-r--r--
PgManager: update comments.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
22
680631f35d83 Add test for PgManager.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     1
import sys
680631f35d83 Add test for PgManager.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     2
680631f35d83 Add test for PgManager.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     3
sys.path.insert(0, '..')
680631f35d83 Add test for PgManager.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     4
680631f35d83 Add test for PgManager.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     5
680631f35d83 Add test for PgManager.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     6
class Config(dict):
680631f35d83 Add test for PgManager.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     7
    def __init__(self, fname):
37
Radek Brich <radek.brich@devl.cz>
parents: 22
diff changeset
     8
        with open(fname) as f:
Radek Brich <radek.brich@devl.cz>
parents: 22
diff changeset
     9
            data = f.read()
22
680631f35d83 Add test for PgManager.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    10
        exec(data, dict(), self)
680631f35d83 Add test for PgManager.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    11