Skip to content

Commit 48d5fd4

Browse files
authored
Merge pull request #476 from Unity-Technologies/UT-2189-fix-broken-unit-tests
UT-2189 fix unit tests no longer in separate package
2 parents b2716ab + dfab88a commit 48d5fd4

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

TestProjects/FbxTests/Packages/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@
4242
},
4343
"registry": "https://staging-packages.unity.com",
4444
"testables": [
45-
"com.unity.formats.fbx.tests"
45+
"com.unity.formats.fbx"
4646
]
4747
}

com.unity.formats.fbx/Tests/Scripts/ExporterTestBaseAPI.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ public abstract class ExporterTestBaseAPI
1313
/// Use this path if you want to load some data for testing, e.g. a
1414
/// material or scene or fbx.
1515
/// </summary>
16-
public const string PathToTestData = "Packages/com.unity.formats.fbx.tests/Tests";
16+
public const string PathToTestData = "Packages/com.unity.formats.fbx/Tests";
17+
public const string AltPathToTestData = "Packages/com.unity.formats.fbx.tests/Tests";
1718

1819
/// <summary>
1920
/// Sleep an amount of time (in ms) so we can safely assume that the
@@ -306,6 +307,11 @@ public static void AssertSameHierarchy (
306307
public string FindPathInUnitTests(string path) {
307308
// This used to be complicated; not so much anymore.
308309
var virtualPath = PathToTestData + '/' + path;
310+
if (!System.IO.File.Exists(virtualPath))
311+
{
312+
virtualPath = AltPathToTestData + '/' + path;
313+
}
314+
309315
if (!System.IO.File.Exists(virtualPath)) {
310316
return null;
311317
}

0 commit comments

Comments
 (0)