Skip to content

Commit 31f2c18

Browse files
Updating unit tests
1 parent 9189ac3 commit 31f2c18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/unit/scripts/test_profiler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ def test_parse_cpu_file(mocker):
7474
parse_cpu_file("non_existent_file.txt", 2)
7575

7676
# Mock the 'open' function call to return a file object.
77-
mock_file = mocker.mock_open(read_data="usage_usec 1000000")
77+
mock_file = mocker.mock_open(read_data="1000000")
7878
mocker.patch("builtins.open", mock_file)
7979

8080
assert parse_cpu_file(
8181
"mocked_file.txt", 1) == 1000
8282
mock_file.assert_called_once_with("mocked_file.txt", "r")
8383

84-
mock_file = mocker.mock_open(read_data="1000000")
84+
mock_file = mocker.mock_open(read_data="usage_usec 1000000")
8585
mocker.patch("builtins.open", mock_file)
8686
assert parse_cpu_file("mocked_file.txt", 1) == 1
8787
mock_file.assert_called_once_with("mocked_file.txt", "r")

0 commit comments

Comments
 (0)