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

Commit28dfccd

Browse files
committed
[Issue#246] fix tests.exclude.ExcludeTest.test_exclude_temp_files
1 parentff2053b commit28dfccd

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

‎tests/exclude.py‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ def test_exclude_temp_files(self):
3030
'postgres',
3131
"select oid from pg_database where datname = 'postgres'").rstrip()
3232

33-
file=os.path.join(node.data_dir,'base',oid,'pgsql_tmp7351.16')
33+
pgsql_tmp_dir=os.path.join(node.data_dir,'base','pgsql_tmp')
34+
35+
os.mkdir(pgsql_tmp_dir)
36+
37+
file=os.path.join(pgsql_tmp_dir,'pgsql_tmp7351.16')
3438
withopen(file,'w')asf:
3539
f.write("HELLO")
3640
f.flush()
@@ -41,8 +45,13 @@ def test_exclude_temp_files(self):
4145

4246
file=os.path.join(
4347
backup_dir,'backups','node',full_id,
44-
'database','base',oid,'pgsql_tmp7351.16')
45-
self.assertFalse(os.path.exists(file))
48+
'database','base','pgsql_tmp','pgsql_tmp7351.16')
49+
50+
self.assertFalse(
51+
os.path.exists(file),
52+
"File must be excluded: {0}".format(file))
53+
54+
# TODO check temporary tablespaces
4655

4756
# Clean after yourself
4857
self.del_test_dir(module_name,fname)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp