◐ Shell
reader mode source ↗
Skip to content
Merged
Show file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ details about the cause of the failure

- Fix incorrect dereference of wrapper object in `tp_repr`, which may result in a program crash
- Fix incorrect dereference in params array handling

## [2.5.0][] - 2020-06-14

Expand Down
3 changes: 2 additions & 1 deletion src/testing/methodtest.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.IO;
using System.Runtime.InteropServices;

namespace Python.Test
Expand Down Expand Up @@ -84,7 +85,7 @@ public Type[] TestNullArrayConversion(Type[] v)

public static string[] TestStringParamsArg(params string[] args)
{
return args;
}

public static object[] TestObjectParamsArg(params object[] args)
Expand Down
9 changes: 6 additions & 3 deletions src/tests/test_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,17 +206,20 @@ def test_null_array_conversion():
def test_string_params_args():
"""Test use of string params."""
result = MethodTest.TestStringParamsArg('one', 'two', 'three')
assert result.Length == 3
assert len(result) == 3, result
assert result[0] == 'one'
assert result[1] == 'two'
assert result[2] == 'three'

result = MethodTest.TestStringParamsArg(['one', 'two', 'three'])
assert len(result) == 3
assert result[0] == 'one'
assert result[1] == 'two'
assert result[2] == 'three'


def test_object_params_args():
Expand Down
Toggle all file notes Toggle all file annotations