annotate tests/test_sqlex.py @ 8:adf056d67c01

ability to export entire db to directory
author Jeff Hammel <k0scist@gmail.com>
date Sat, 01 Apr 2017 13:01:57 -0700
parents a05c70cc24be
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
1 #!/usr/bin/env python
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
2 # -*- coding: utf-8 -*-
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
3
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
4 """
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
5 unit tests for sqlex
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
6 """
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
7
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
8 import os
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
9 import sys
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
10 import tempfile
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
11 import unittest
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
12
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
13 # globals
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
14 here = os.path.dirname(os.path.abspath(__file__))
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
15
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
16 class sqlexUnitTest(unittest.TestCase):
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
17
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
18 def test_sqlex(self):
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
19 tf = tempfile.mktemp()
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
20 try:
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
21 # pass
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
22 pass
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
23 finally:
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
24 if os.path.exists(tf):
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
25 os.remove(tf)
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
26
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
27 if __name__ == '__main__':
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
28 unittest.main()
a05c70cc24be initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
29