test: remove unused tests for stale file cleanup in Python tools syncing (#327)

main
Marcus Sanatan 2025-10-18 00:56:57 -04:00 committed by GitHub
parent 85cc93f33c
commit dbdaa76d75
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 41 deletions

View File

@ -147,31 +147,6 @@ namespace MCPForUnityTests.Editor.Data
Assert.Greater(_asset.fileStates[0].lastSyncTime, firstTime, "Should update sync time");
}
[Test]
public void CleanupStaleStates_RemovesStatesForRemovedFiles()
{
var file1 = new TextAsset("print('test1')");
var file2 = new TextAsset("print('test2')");
// Add both files
_asset.pythonFiles.Add(file1);
_asset.pythonFiles.Add(file2);
// Record sync for both
_asset.RecordSync(file1, "hash1");
_asset.RecordSync(file2, "hash2");
Assert.AreEqual(2, _asset.fileStates.Count, "Should have two states");
// Remove one file
_asset.pythonFiles.Remove(file1);
// Cleanup
_asset.CleanupStaleStates();
Assert.AreEqual(1, _asset.fileStates.Count, "Should have one state after cleanup");
}
[Test]
public void CleanupStaleStates_KeepsStatesForCurrentFiles()
{

View File

@ -59,22 +59,6 @@ namespace MCPForUnityTests.Editor.Services
Assert.AreEqual(0, result.ErrorCount, "Should not have errors");
}
[Test]
public void SyncProjectTools_CleansUpStaleFiles()
{
// Create a stale file in the destination
Directory.CreateDirectory(_testToolsDir);
string staleFile = Path.Combine(_testToolsDir, "old_tool.py");
File.WriteAllText(staleFile, "print('old')");
Assert.IsTrue(File.Exists(staleFile), "Stale file should exist before sync");
// Sync with no assets (should cleanup the stale file)
_service.SyncProjectTools(_testToolsDir);
Assert.IsFalse(File.Exists(staleFile), "Stale file should be removed after sync");
}
[Test]
public void SyncProjectTools_ReportsCorrectCounts()
{