Skip to content

Commit e952f12

Browse files
Persisted test data is currently using US format, and related asserts will fail on non-US systems. Setting culture overcomes this until test data, or asserts, can be made culture agnostic
1 parent c35b537 commit e952f12

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

UnityDataTool.Tests/GlobalSetup.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System.Globalization;
2+
using System.Threading;
3+
using NUnit.Framework;
4+
5+
namespace UnityDataTools.UnityDataTool.Tests;
6+
7+
[SetUpFixture]
8+
public class GlobalSetup
9+
{
10+
[OneTimeSetUp]
11+
public void RunBeforeAnyTests()
12+
{
13+
// Serialized test data is in en-US format. Ensure that the tests run in this culture to avoid formatting
14+
// related false negatives.
15+
// TODO: Fix test data to be culture agnostic.
16+
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
17+
}
18+
}

0 commit comments

Comments
 (0)