[Tests]Disallow user override of culture options while running tests (#28207)

* [Tests]Disallow user override of culture options while running tests

* Revert unintended changes to the system's plugin

* Embed utc in the date to run utc tests on other timezones
This commit is contained in:
Jaime Bernardo
2023-09-04 16:16:26 +01:00
committed by GitHub
parent 2c5659d746
commit 90e5362385
6 changed files with 34 additions and 26 deletions

View File

@@ -20,9 +20,9 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate.UnitTests
{
// Set culture to 'en-us'
originalCulture = CultureInfo.CurrentCulture;
CultureInfo.CurrentCulture = new CultureInfo("en-us");
CultureInfo.CurrentCulture = new CultureInfo("en-us", false);
originalUiCulture = CultureInfo.CurrentUICulture;
CultureInfo.CurrentUICulture = new CultureInfo("en-us");
CultureInfo.CurrentUICulture = new CultureInfo("en-us", false);
}
[DataTestMethod]