Skip to content

Commit f87daad

Browse files
dsarnoclaude
andcommitted
fix: skip SceneView debug mode test in batch mode CI
SceneView.lastActiveSceneView is null in batch mode, so stats_set_scene_debug correctly returns an error. Use Assume.That to mark the test inconclusive rather than failing CI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1a9c17e commit f87daad

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

TestProjects/UnityMCPTests/Assets/Tests/EditMode/Tools/ManageGraphicsTests.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public class ManageGraphicsTests
1616
private bool _hasVolumeSystem;
1717
private bool _hasURP;
1818
private bool _hasHDRP;
19+
private bool _hasSceneView;
1920

2021
[SetUp]
2122
public void SetUp()
@@ -31,6 +32,8 @@ public void SetUp()
3132
_hasURP = data?.Value<bool>("hasURP") ?? false;
3233
_hasHDRP = data?.Value<bool>("hasHDRP") ?? false;
3334
}
35+
36+
_hasSceneView = UnityEditor.SceneView.lastActiveSceneView != null;
3437
}
3538

3639
[TearDown]
@@ -583,6 +586,7 @@ public void StatsGetMemory_ReturnsMemoryInfo()
583586
[Test]
584587
public void StatsSetSceneDebug_ValidMode_Succeeds()
585588
{
589+
Assume.That(_hasSceneView, "No SceneView in batch mode — skipping.");
586590
var result = ToJObject(ManageGraphics.HandleCommand(new JObject
587591
{
588592
["action"] = "stats_set_scene_debug",

0 commit comments

Comments
 (0)