Skip to content

Commit dbdaa76

Browse files
authored
test: remove unused tests for stale file cleanup in Python tools syncing (#327)
1 parent 85cc93f commit dbdaa76

File tree

2 files changed

+0
-41
lines changed

2 files changed

+0
-41
lines changed

TestProjects/UnityMCPTests/Assets/Tests/EditMode/Data/PythonToolsAssetTests.cs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -147,31 +147,6 @@ public void RecordSync_UpdatesExistingFileState()
147147
Assert.Greater(_asset.fileStates[0].lastSyncTime, firstTime, "Should update sync time");
148148
}
149149

150-
[Test]
151-
public void CleanupStaleStates_RemovesStatesForRemovedFiles()
152-
{
153-
var file1 = new TextAsset("print('test1')");
154-
var file2 = new TextAsset("print('test2')");
155-
156-
// Add both files
157-
_asset.pythonFiles.Add(file1);
158-
_asset.pythonFiles.Add(file2);
159-
160-
// Record sync for both
161-
_asset.RecordSync(file1, "hash1");
162-
_asset.RecordSync(file2, "hash2");
163-
164-
Assert.AreEqual(2, _asset.fileStates.Count, "Should have two states");
165-
166-
// Remove one file
167-
_asset.pythonFiles.Remove(file1);
168-
169-
// Cleanup
170-
_asset.CleanupStaleStates();
171-
172-
Assert.AreEqual(1, _asset.fileStates.Count, "Should have one state after cleanup");
173-
}
174-
175150
[Test]
176151
public void CleanupStaleStates_KeepsStatesForCurrentFiles()
177152
{

TestProjects/UnityMCPTests/Assets/Tests/EditMode/Services/ToolSyncServiceTests.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,22 +59,6 @@ public void SyncProjectTools_ReturnsSuccess_WhenNoPythonToolsAssets()
5959
Assert.AreEqual(0, result.ErrorCount, "Should not have errors");
6060
}
6161

62-
[Test]
63-
public void SyncProjectTools_CleansUpStaleFiles()
64-
{
65-
// Create a stale file in the destination
66-
Directory.CreateDirectory(_testToolsDir);
67-
string staleFile = Path.Combine(_testToolsDir, "old_tool.py");
68-
File.WriteAllText(staleFile, "print('old')");
69-
70-
Assert.IsTrue(File.Exists(staleFile), "Stale file should exist before sync");
71-
72-
// Sync with no assets (should cleanup the stale file)
73-
_service.SyncProjectTools(_testToolsDir);
74-
75-
Assert.IsFalse(File.Exists(staleFile), "Stale file should be removed after sync");
76-
}
77-
7862
[Test]
7963
public void SyncProjectTools_ReportsCorrectCounts()
8064
{

0 commit comments

Comments
 (0)