Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use TESTFN iso. hard-coded test file paths in sqlite3 tests #93795

Closed
Assignees
erlend-aasland
Labels
testsTests in the Lib/test dirtopic-sqlite3type-bugAn unexpected behavior, bug, or error
@erlend-aasland

Description

@erlend-aasland

Current code:

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

Labels

testsTests in the Lib/test dirtopic-sqlite3type-bugAn unexpected behavior, bug, or error

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp