Skip to content

Commit

Permalink
Fix assertion on expected OSError
Browse files Browse the repository at this point in the history
  • Loading branch information
natthan-pigoux committed Sep 17, 2024
1 parent ddde96c commit a6119f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions diracx-core/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def test_write_credentials_is_locking_file():
proc_write.join()
proc_read.join()

assert isinstance(exec_info.value, OSError)
assert isinstance(exec_info.value, OSError) is False

Check failure on line 74 in diracx-core/tests/test_utils.py

View workflow job for this annotation

GitHub Actions / Unit test - ./diracx-core

test_write_credentials_is_locking_file AssertionError: assert True is False + where True = isinstance(OSError(22, 'Invalid argument'), OSError) + where OSError(22, 'Invalid argument') = <ExceptionInfo OSError(22, 'Invalid argument') tblen=2>.value

Check failure on line 74 in diracx-core/tests/test_utils.py

View workflow job for this annotation

GitHub Actions / pytest-integration

test_write_credentials_is_locking_file AssertionError: assert True is False + where True = isinstance(OSError(22, 'Invalid argument'), OSError) + where OSError(22, 'Invalid argument') = <ExceptionInfo OSError(22, 'Invalid argument') tblen=2>.value


def test_read_creadentials_is_locking_file():
Expand All @@ -96,4 +96,4 @@ def test_read_creadentials_is_locking_file():
proc_write.join()
proc_read.join()

assert isinstance(exec_info.value, OSError)
assert isinstance(exec_info.value, OSError) is False

0 comments on commit a6119f9

Please sign in to comment.