Skip to content

Commit ca0bddc

Browse files
Fix test_put_get.py::test_get_file_permissions
1 parent 2ac1fba commit ca0bddc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/integ/test_put_get.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,16 +757,20 @@ def test_get_file_permission(tmp_path, conn_cnx, caplog, auto_compress):
757757
cur.execute(
758758
f"PUT 'file://{filename_in_put}' @{stage_name} AUTO_COMPRESS={auto_compress}",
759759
)
760+
test_file.unlink()
760761

761762
with caplog.at_level(logging.ERROR):
762763
cur.execute(f"GET @{stage_name}/data.csv file://{tmp_path}")
763764
assert "FileNotFoundError" not in caplog.text
765+
assert len(list(tmp_path.iterdir())) == 1
766+
downloaded_file = next(tmp_path.iterdir())
764767

765768
default_mask = os.umask(0)
766769
os.umask(default_mask)
767770

768771
assert (
769-
oct(os.stat(test_file).st_mode)[-3:] == oct(0o600 & ~default_mask)[-3:]
772+
oct(os.stat(downloaded_file).st_mode)[-3:]
773+
== oct(0o600 & ~default_mask)[-3:]
770774
)
771775

772776

0 commit comments

Comments
 (0)