public async Task ArrayReadInt32() { var array = new int[] { 1 }; var read = await SubscriptHelper.LoadSubscript(interpreter, context, array, 0); Assert.That(read, Is.EqualTo(1)); }
public async Task IListReadInt32() { var list = new List <int> { 1 }; var read = await SubscriptHelper.LoadSubscript(interpreter, context, list, 0); Assert.That(read, Is.EqualTo(1)); }
public async Task IDictReadInt32() { var dict = new Dictionary <int, int> { [0] = 1 }; var read = await SubscriptHelper.LoadSubscript(interpreter, context, dict, 0); Assert.That(read, Is.EqualTo(1)); }
public async Task IDictReadPyInteger() { var dict = new Dictionary <PyInteger, int> { [PyInteger.Create(0)] = 1 }; var read = await SubscriptHelper.LoadSubscript(interpreter, context, dict, PyInteger.Create(0)); Assert.That(read, Is.EqualTo(1)); }
public async Task PyListReadInt32() { var list = PyList.Create(); var stored = PyInteger.Create(1); PyListClass.append(list, stored); var read = await SubscriptHelper.LoadSubscript(interpreter, context, list, 0); Assert.That(read, Is.EqualTo(stored)); }