Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Tests for clr.GetClrType()
  • Loading branch information
vivainio committed Mar 22, 2017
commit 443e3077d5c11674ddb8755d9e9e67e2fc7c6432
10 changes: 10 additions & 0 deletions src/tests/test_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,16 @@ def test_clr_add_reference():
with pytest.raises(FileNotFoundException):
AddReference("somethingtotallysilly")

def test_clr_get_clr_type():
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add the test to invoke the ArgumentException error?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

"""Test clr.GetClrType()."""
from clr import GetClrType
from System import String
from System import IComparable

assert GetClrType(String).FullName == "System.String"
comparable = GetClrType(IComparable)
assert comparable.FullName == "System.IComparable"
assert comparable.IsInterface

def test_assembly_load_thread_safety():
from Python.Test import ModuleTest
Expand Down