Skip to content

Commit

Permalink
formatting fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
joka921 committed Dec 23, 2024
1 parent 1cf6d16 commit 2fc801a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ package-data = { "qlever" = ["Qleverfiles/*"] }

[tool.pytest.ini_options]
pythonpath = ["src"]

[tool.ruff]
line-length = 79
14 changes: 11 additions & 3 deletions test/qlever/commands/test_status_execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ class TestStatusCommand(unittest.TestCase):
# testing execute for 2 processes. Just the second one is a qlever process.
# Mocking the process_iter and show_process_info method and testing
# if the methods are called correctly.
def test_execute_processes_found(self, mock_process_iter, mock_show_process_info):
def test_execute_processes_found(
self, mock_process_iter, mock_show_process_info
):
# Mocking the input for the execute function
[args, args.cmdline_regex, args.show] = get_mock_args(False)

Expand Down Expand Up @@ -51,7 +53,11 @@ def test_execute_processes_found(self, mock_process_iter, mock_show_process_info

# Mock the return value of process_iter
# to be a list of these mocked process objects
mock_process_iter.return_value = [mock_process1, mock_process2, mock_process3]
mock_process_iter.return_value = [
mock_process1,
mock_process2,
mock_process3,
]

# Simulate show_process_info returning False for the first
# True for the second and False for the third process
Expand All @@ -72,7 +78,9 @@ def test_execute_processes_found(self, mock_process_iter, mock_show_process_info
call(mock_process2, args.cmdline_regex, show_heading=True),
call(mock_process3, args.cmdline_regex, show_heading=False),
]
mock_show_process_info.assert_has_calls(expected_calls, any_order=False)
mock_show_process_info.assert_has_calls(
expected_calls, any_order=False
)
self.assertTrue(result)

@patch("qlever.util.show_process_info")
Expand Down
4 changes: 3 additions & 1 deletion test/qlever/commands/test_status_other_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
class TestStatusCommand(unittest.TestCase):
def test_description(self):
result = StatusCommand().description()
self.assertEqual(result, "Show QLever processes running on this machine")
self.assertEqual(
result, "Show QLever processes running on this machine"
)

def test_should_have_qleverfile(self):
self.assertFalse(StatusCommand().should_have_qleverfile())
Expand Down

0 comments on commit 2fc801a

Please sign in to comment.