Skip to content

Commit

Permalink
u
Browse files Browse the repository at this point in the history
  • Loading branch information
SCHREIBER Martin committed Jan 8, 2025
1 parent 9d8c146 commit 9cdadf5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/psyclone/parse/module_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ def __init__(
raise TypeError("Expected type 'str' for argument 'module_name'")

if not isinstance(file_info, FileInfo):
raise TypeError("Expected type 'FileInfo' for argument 'file_info'")
raise TypeError("Expected type 'FileInfo' for"
" argument 'file_info'")

self._name = module_name.lower()

Expand Down
10 changes: 6 additions & 4 deletions src/psyclone/tests/parse/module_info_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,11 +497,13 @@ def test_minfo_type_errors():
"""

with pytest.raises(TypeError) as einfo:
module_info: ModuleInfo = ModuleInfo(None, None)
ModuleInfo(None, None)

assert ("Expected type 'str' for argument 'module_name'" in str(einfo.value))
assert ("Expected type 'str' for argument"
" 'module_name'" in str(einfo.value))

with pytest.raises(TypeError) as einfo:
module_info: ModuleInfo = ModuleInfo("foo", None)
ModuleInfo("foo", None)

assert ("Expected type 'FileInfo' for argument 'file_info'" in str(einfo.value))
assert ("Expected type 'FileInfo' for argument"
" 'file_info'" in str(einfo.value))

0 comments on commit 9cdadf5

Please sign in to comment.