-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
* bring in bugfix from #4532 * add meta files * remove extra file * update yamato tests * use v2 action and pin python version (#4568) * update changelog Co-authored-by: Chris Elion <chris.elion@unity3d.com>
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System.Collections; | ||
using NUnit.Framework; | ||
using UnityEngine.TestTools; | ||
using UnityEngine; | ||
using UnityEngine.SceneManagement; | ||
using Unity.MLAgents; | ||
#if UNITY_EDITOR | ||
using UnityEditor.SceneManagement; | ||
#endif | ||
|
||
namespace Tests | ||
{ | ||
public class AcademyStepperTest | ||
{ | ||
[SetUp] | ||
public void Setup() | ||
{ | ||
SceneManager.LoadScene("ML-Agents/Scripts/Tests/Runtime/AcademyTest/AcademyStepperTestScene"); | ||
} | ||
|
||
/// <summary> | ||
/// Verify in each update, the Academy is only stepped once. | ||
/// </summary> | ||
[UnityTest] | ||
public IEnumerator AcademyStepperCleanupPasses() | ||
{ | ||
var academy = Academy.Instance; | ||
int initStepCount = academy.TotalStepCount; | ||
for (var i = 0; i < 5; i++) | ||
{ | ||
yield return new WaitForFixedUpdate(); | ||
Assert.True(academy.TotalStepCount - initStepCount == i + 1); | ||
} | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.