fix: remove extra quote when executing a note indexation and update deps
This commit is contained in:
parent
5908a70691
commit
67595b3220
11 changed files with 228 additions and 305 deletions
|
|
@ -10,7 +10,8 @@ def exec_capture(func: Callable):
|
|||
|
||||
|
||||
def test_capture():
|
||||
def func(): return 1
|
||||
def func():
|
||||
return 1
|
||||
|
||||
assert exec_capture(func) == 1
|
||||
|
||||
|
|
@ -22,9 +23,10 @@ def test_capture_exits_with_custom_os_error(mocker):
|
|||
nonlocal exit_code
|
||||
exit_code = code
|
||||
|
||||
mocker.patch('halig.utils.sys.exit', side_effect=mock_exit)
|
||||
mocker.patch("halig.utils.sys.exit", side_effect=mock_exit)
|
||||
|
||||
def func(): raise OSError(2, "os_error_func")
|
||||
def func():
|
||||
raise OSError(2, "os_error_func")
|
||||
|
||||
exec_capture(func)
|
||||
assert exit_code == 2
|
||||
|
|
@ -37,9 +39,10 @@ def test_capture_exits_with_os_error(mocker):
|
|||
nonlocal exit_code
|
||||
exit_code = code
|
||||
|
||||
mocker.patch('halig.utils.sys.exit', side_effect=mock_exit)
|
||||
mocker.patch("halig.utils.sys.exit", side_effect=mock_exit)
|
||||
|
||||
def func(): raise OSError
|
||||
def func():
|
||||
raise OSError
|
||||
|
||||
exec_capture(func)
|
||||
assert not exit_code
|
||||
|
|
@ -52,9 +55,10 @@ def test_capture_exits_with_value_error(mocker):
|
|||
nonlocal exit_code
|
||||
exit_code = code
|
||||
|
||||
mocker.patch('halig.utils.sys.exit', side_effect=mock_exit)
|
||||
mocker.patch("halig.utils.sys.exit", side_effect=mock_exit)
|
||||
|
||||
def func(): raise ValueError("value_error_func")
|
||||
def func():
|
||||
raise ValueError("value_error_func")
|
||||
|
||||
exec_capture(func)
|
||||
assert exit_code == 1
|
||||
|
|
@ -67,9 +71,10 @@ def test_capture_exits_with_other_error(mocker):
|
|||
nonlocal exit_code
|
||||
exit_code = code
|
||||
|
||||
mocker.patch('halig.utils.sys.exit', side_effect=mock_exit)
|
||||
mocker.patch("halig.utils.sys.exit", side_effect=mock_exit)
|
||||
|
||||
def func(): raise ArithmeticError("arithmetic_error_func")
|
||||
def func():
|
||||
raise ArithmeticError("arithmetic_error_func")
|
||||
|
||||
exec_capture(func)
|
||||
assert exit_code == 2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue