Skip to content

Commit 4048fb5

Browse files
committed
Fix typo
1 parent 780b274 commit 4048fb5

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

checkbox-support/checkbox_support/helpers/file_watcher.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import os
2828

2929

30-
class InotfiyEvent:
30+
class InotifyEvent:
3131
"""
3232
A class to store inotify system event
3333
"""
@@ -147,7 +147,7 @@ def read_events(self, size: int) -> list:
147147
else ""
148148
)
149149
event.append(
150-
InotfiyEvent(wd, self._mask2event(mask), cookie, name)
150+
InotifyEvent(wd, self._mask2event(mask), cookie, name)
151151
)
152152
raw_data = raw_data[length:]
153153
return event

checkbox-support/checkbox_support/helpers/tests/test_file_watcher.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
from checkbox_support.helpers.file_watcher import FileWatcher, InotfiyEvent
1+
from checkbox_support.helpers.file_watcher import FileWatcher, InotifyEvent
22
from unittest.mock import MagicMock, patch
33
import unittest
44

55

66
class TestInotifyEvent(unittest.TestCase):
77
"""
8-
Test the InotfiyEvent data class.
8+
Test the InotifyEvent data class.
99
"""
1010

1111
def test_inotify_event_creation(self):
12-
event = InotfiyEvent(
12+
event = InotifyEvent(
1313
wd=1, event_type="modify", cookie=0, name="test_file.txt"
1414
)
1515
self.assertEqual(event.wd, 1)
@@ -84,7 +84,7 @@ def test_mask2event(self):
8484
self.assertEqual(watcher._mask2event(0x0000FFFF), "unknown")
8585

8686
@patch("checkbox_support.helpers.file_watcher.os.read")
87-
@patch("checkbox_support.helpers.file_watcher.InotfiyEvent")
87+
@patch("checkbox_support.helpers.file_watcher.InotifyEvent")
8888
@patch.object(FileWatcher, "libc")
8989
def test_read_events_single_event(
9090
self, mock_libc, mock_inotify_event, mock_os_read
@@ -108,7 +108,7 @@ def test_read_events_single_event(
108108
self.assertEqual(events[0], mock_event_instance)
109109

110110
@patch("checkbox_support.helpers.file_watcher.os.read")
111-
@patch("checkbox_support.helpers.file_watcher.InotfiyEvent")
111+
@patch("checkbox_support.helpers.file_watcher.InotifyEvent")
112112
@patch.object(FileWatcher, "libc")
113113
def test_read_events_multiple_events(
114114
self, mock_libc, mock_inotify_event, mock_os_read

0 commit comments

Comments
 (0)