From 30e4b210203571b7a3ad70c60af91d7a12bc7286 Mon Sep 17 00:00:00 2001 From: Meinrad Recheis Date: Wed, 10 Apr 2019 11:03:46 +0200 Subject: [PATCH] moved all ops_test.py tests into their own folder/namespace --- .../{ => ops_test}/ControlDependenciesTest.cs | 8 +++++--- .../{ => ops_test}/CreateOpFromTfOperationTest.cs | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) rename test/TensorFlowNET.UnitTest/{ => ops_test}/ControlDependenciesTest.cs (94%) rename test/TensorFlowNET.UnitTest/{ => ops_test}/CreateOpFromTfOperationTest.cs (97%) diff --git a/test/TensorFlowNET.UnitTest/ControlDependenciesTest.cs b/test/TensorFlowNET.UnitTest/ops_test/ControlDependenciesTest.cs similarity index 94% rename from test/TensorFlowNET.UnitTest/ControlDependenciesTest.cs rename to test/TensorFlowNET.UnitTest/ops_test/ControlDependenciesTest.cs index 4c81a85e..315313c6 100644 --- a/test/TensorFlowNET.UnitTest/ControlDependenciesTest.cs +++ b/test/TensorFlowNET.UnitTest/ops_test/ControlDependenciesTest.cs @@ -6,7 +6,7 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Tensorflow; using Tensorflow.Eager; -namespace TensorFlowNET.UnitTest +namespace TensorFlowNET.UnitTest.ops_test { /// /// excerpt of tensorflow/python/framework/ops_test.py @@ -157,8 +157,8 @@ namespace TensorFlowNET.UnitTest }); }); }); - assertItemsEqual(new[] { a_1.op, a_2.op, a_3.op, a_4.op }, b_1.op.control_inputs); - assertItemsEqual(b_1.op.control_inputs, b_2.op.control_inputs); + assertItemsEqual(b_1.op.control_inputs, new[] { a_1.op, a_2.op, a_3.op, a_4.op }); + assertItemsEqual(b_2.op.control_inputs, b_1.op.control_inputs); } [TestMethod] @@ -200,6 +200,7 @@ namespace TensorFlowNET.UnitTest b_none2 = constant_op.constant(12.0); }); }); + // Note assertItemsEqual(given, expected), expected and given parameters should be swapped below assertItemsEqual(new[] { a_3.op, a_4.op }, b_3_4.op.control_inputs); assertItemsEqual(new[] { a_3.op }, b_3.op.control_inputs); assertItemsEqual(new object[0], b_none.op.control_inputs); @@ -256,6 +257,7 @@ namespace TensorFlowNET.UnitTest }); }); + // Note assertItemsEqual(given, expected), expected and given parameters should be swapped below assertItemsEqual(new[] {a_1.op}, b_1.op.control_inputs); assertItemsEqual(new[] {a_1.op, a_2.op}, b_2.op.control_inputs); assertItemsEqual(new[] { a_1.op, a_2.op}, b_3.op.control_inputs); diff --git a/test/TensorFlowNET.UnitTest/CreateOpFromTfOperationTest.cs b/test/TensorFlowNET.UnitTest/ops_test/CreateOpFromTfOperationTest.cs similarity index 97% rename from test/TensorFlowNET.UnitTest/CreateOpFromTfOperationTest.cs rename to test/TensorFlowNET.UnitTest/ops_test/CreateOpFromTfOperationTest.cs index 967dbfaa..048d9bac 100644 --- a/test/TensorFlowNET.UnitTest/CreateOpFromTfOperationTest.cs +++ b/test/TensorFlowNET.UnitTest/ops_test/CreateOpFromTfOperationTest.cs @@ -6,7 +6,7 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Tensorflow; using Tensorflow.Operations; -namespace TensorFlowNET.UnitTest +namespace TensorFlowNET.UnitTest.ops_test { /// /// excerpt of tensorflow/python/framework/ops_test.py