🌐 AI搜索 & 代理 主页
Skip to content
Closed
Show file tree
Hide file tree
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
Moved test_object_string_format to a more fitting location.
  • Loading branch information
rmadsen-ks committed Oct 28, 2022
commit c12032f8eda701f333841f6961c9197f80e894da
2 changes: 1 addition & 1 deletion src/python_tests_runner/PythonTestRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static IEnumerable<string[]> PythonTestCases()
// Add the test that you want to debug here.
yield return new[] { "test_indexer", "test_boolean_indexer" };
yield return new[] { "test_delegate", "test_bool_delegate" };
yield return new[] { "test_delegate", "test_object_string_format" };
yield return new[] { "test_conversion", "test_object_string_format" };
}

/// <summary>
Expand Down
6 changes: 6 additions & 0 deletions tests/test_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,3 +752,9 @@ def test_explicit_conversion():
assert int(t(123.4)) == 123
with pytest.raises(TypeError):
index(t(123.4))

def test_object_string_format():
from System import String
integer_value = 200
string_value = String.Format("{0}", integer_value)
assert string_value == "200", f"{string_value} != ""200"""
7 changes: 1 addition & 6 deletions tests/test_delegate.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,10 +452,5 @@ def wrong_return_type(intValue, stringValue):

# test return wrong type

def test_object_string_format():
"""Test boolean delegate."""
from System import String
integer_value = 200
string_value = String.Format("{0}", integer_value)
assert string_value == "200", f"{string_value} != ""200"""