using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Newtonsoft.Json.Linq;
using NumSharp;
using Tensorflow;
using Tensorflow.Util;
namespace TensorFlowNET.UnitTest
{
///
/// Use as base class for test classes to get additional assertions
///
public class PythonTest : Python
{
#region python compatibility layer
protected PythonTest self { get => this; }
protected object None {
get { return null; }
}
#endregion
#region pytest assertions
public void assertItemsEqual(ICollection given, ICollection expected)
{
if (given is Hashtable && expected is Hashtable)
{
Assert.AreEqual(JObject.FromObject(expected).ToString(), JObject.FromObject(given).ToString());
return;
}
Assert.IsNotNull(expected);
Assert.IsNotNull(given);
var e = expected.OfType