diff options
Diffstat (limited to 'test/testsupport.py')
-rw-r--r-- | test/testsupport.py | 14 |
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) |