Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Current code:
cpython/Lib/test/test_sqlite3/test_transactions.py
Lines 28 to 54 in5bcf33d
| defget_db_path(): | |
| return"sqlite_testdb" | |
| classTransactionTests(unittest.TestCase): | |
| defsetUp(self): | |
| try: | |
| os.remove(get_db_path()) | |
| exceptOSError: | |
| pass | |
| self.con1=sqlite.connect(get_db_path(),timeout=0.1) | |
| self.cur1=self.con1.cursor() | |
| self.con2=sqlite.connect(get_db_path(),timeout=0.1) | |
| self.cur2=self.con2.cursor() | |
| deftearDown(self): | |
| self.cur1.close() | |
| self.con1.close() | |
| self.cur2.close() | |
| self.con2.close() | |
| try: | |
| os.unlink(get_db_path()) | |
| exceptOSError: | |
| pass |
Suggesting to use the test.support helpersTESTFN andunlink.
Metadata
Metadata
Assignees
Projects
Status
Done