@@ -44,9 +44,7 @@ def test_move_from(p):
4444
4545 inotify = create_inotify_watch (p ("dir1" ).encode ())
4646 mv (p ("dir1" , "a" ), p ("dir2" , "b" ))
47- event = wait_for_move_event (inotify .read_event )
48- assert event .ev .is_moved_from
49- assert event .path == p ("dir1" , "a" ).encode ()
47+ assert_event (inotify , p ("dir1" , "a" ), InotifyConstants .IN_MOVED_FROM )
5048 inotify .deactivate ()
5149
5250
@@ -58,9 +56,7 @@ def test_move_to(p):
5856
5957 inotify = create_inotify_watch (p ("dir2" ).encode ())
6058 mv (p ("dir1" , "a" ), p ("dir2" , "b" ))
61- event = wait_for_move_event (inotify .read_event )
62- assert event .ev .is_moved_to
63- assert event .path == p ("dir2" , "b" ).encode ()
59+ assert_event (inotify , p ("dir2" , "b" ), InotifyConstants .IN_MOVED_TO )
6460 inotify .deactivate ()
6561
6662
@@ -245,7 +241,7 @@ def assert_inotify_root_events(inotify_root: InotifyWatchGroup) -> None:
245241 inotify_a = create_inotify_watch (original_path .encode ())
246242 inotify_root = create_inotify_watch (p ("rootdir" ).encode (), recursive = True )
247243 run ()
248- assert_inotify_a_events (inotify_a ) # still no move events, and original path for all events
244+ assert_inotify_a_events (inotify_a )
249245 assert_inotify_root_events (inotify_root )
250246 inotify_root .deactivate ()
251247 inotify_a .deactivate ()
0 commit comments