Skip to content

Commit cbb88db

Browse files
committed
Reduce number of vars in test_skip_existing_symlinks().
1 parent 9691530 commit cbb88db

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/test_relink.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,6 @@ def test_skip_existing_symlinks(self, temp_dirs, current_user, caplog):
120120

121121
# Get the inode and mtime before running the function
122122
stat_before = os.lstat(source_link)
123-
inode_before = stat_before.st_ino
124-
mtime_before = stat_before.st_mtime
125123

126124
# Run the function
127125
with caplog.at_level(logging.INFO):
@@ -130,9 +128,11 @@ def test_skip_existing_symlinks(self, temp_dirs, current_user, caplog):
130128
# Verify the symlink is unchanged (same inode means it wasn't deleted/recreated)
131129
stat_after = os.lstat(source_link)
132130
assert (
133-
inode_before == stat_after.st_ino
131+
stat_before.st_ino == stat_after.st_ino
134132
), "Symlink should not have been recreated"
135-
assert mtime_before == stat_after.st_mtime, "Symlink mtime should be unchanged"
133+
assert (
134+
stat_before.st_mtime == stat_after.st_mtime
135+
), "Symlink mtime should be unchanged"
136136
assert (
137137
os.readlink(source_link) == dummy_target
138138
), "Symlink target should be unchanged"

0 commit comments

Comments
 (0)