ppo-SnowballTarget / com.unity.ml-agents.tests /Tests /Editor /Communicator /RpcCommunicatorTests.cs
Download com.unity.ml-agents.tests/Tests/Editor/Communicator/RpcCommunicatorTests.cs from ashish2244/ppo-SnowballTarget: direct link, hf CLI and curl.
- Browser
- Download file 1.43 kB
-
https://huggingface.co/ashish2244/ppo-SnowballTarget/resolve/main/com.unity.ml-agents.tests/Tests/Editor/Communicator/RpcCommunicatorTests.cs
- Command line
-
hf download hf://ashish2244/ppo-SnowballTarget/com.unity.ml-agents.tests/Tests/Editor/Communicator/RpcCommunicatorTests.cs
-
curl -L -o RpcCommunicatorTests.cs https://huggingface.co/ashish2244/ppo-SnowballTarget/resolve/main/com.unity.ml-agents.tests/Tests/Editor/Communicator/RpcCommunicatorTests.cs
1.43 kB
| using NUnit.Framework; | |
| using UnityEngine.TestTools; | |
| namespace Unity.MLAgents.Tests.Communicator | |
| { | |
| [] | |
| public class RpcCommunicatorTests | |
| { | |
| [] | |
| public void TestCheckCommunicationVersionsAreCompatible() | |
| { | |
| var unityVerStr = "1.0.0"; | |
| var pythonVerStr = "1.0.0"; | |
| Assert.IsTrue(RpcCommunicator.CheckCommunicationVersionsAreCompatible(unityVerStr, | |
| pythonVerStr)); | |
| LogAssert.NoUnexpectedReceived(); | |
| pythonVerStr = "1.1.0"; | |
| Assert.IsTrue(RpcCommunicator.CheckCommunicationVersionsAreCompatible(unityVerStr, | |
| pythonVerStr)); | |
| LogAssert.NoUnexpectedReceived(); | |
| unityVerStr = "2.0.0"; | |
| Assert.IsFalse(RpcCommunicator.CheckCommunicationVersionsAreCompatible(unityVerStr, | |
| pythonVerStr)); | |
| unityVerStr = "0.15.0"; | |
| pythonVerStr = "0.15.0"; | |
| Assert.IsTrue(RpcCommunicator.CheckCommunicationVersionsAreCompatible(unityVerStr, | |
| pythonVerStr)); | |
| unityVerStr = "0.16.0"; | |
| Assert.IsFalse(RpcCommunicator.CheckCommunicationVersionsAreCompatible(unityVerStr, | |
| pythonVerStr)); | |
| unityVerStr = "1.15.0"; | |
| Assert.IsFalse(RpcCommunicator.CheckCommunicationVersionsAreCompatible(unityVerStr, | |
| pythonVerStr)); | |
| } | |
| } | |
| } | |