summaryrefslogtreecommitdiff
path: root/test/testsupport.py
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2013-11-17 17:25:01 -0500
committerMicah Anderson <micah@riseup.net>2013-11-17 17:25:01 -0500
commit79d16d72cd530acbee682ebee44d5b1d2010c661 (patch)
treed04b84f51e5023cc7382ec91674e2967ffb533c7 /test/testsupport.py
initial import of debian package to build with autobuilderupstream
Diffstat (limited to 'test/testsupport.py')
-rw-r--r--test/testsupport.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/testsupport.py b/test/testsupport.py
new file mode 100644
index 0000000..18d9ff4
--- /dev/null
+++ b/test/testsupport.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python
+import _sqlite
+import os, tempfile, unittest
+
+class TestSupport:
+ def getfilename(self):
+ if _sqlite.sqlite_version_info() >= (2, 8, 2):
+ return ":memory:"
+ else:
+ return tempfile.mktemp()
+
+ def removefile(self):
+ if self.filename != ":memory:":
+ os.remove(self.filename)