Skip to content

Commit

Permalink
Use contraint-based assert and switch back to .NET 8 for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
slozier committed Jun 29, 2024
1 parent b7d4f12 commit b6384f0
Show file tree
Hide file tree
Showing 7 changed files with 275 additions and 286 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ dotnet_diagnostic.CA1845.severity = none # CA1845: Use span-based 'string
dotnet_diagnostic.CA1846.severity = none # CA1846: Prefer 'AsSpan' over 'Substring'
dotnet_diagnostic.CA1847.severity = none # CA1847: Use char literal for a single character lookup
dotnet_diagnostic.CA1852.severity = suggestion # CA1852: Seal internal types
dotnet_diagnostic.CA1854.severity = suggestion # CA1854: Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method
dotnet_diagnostic.CA1859.severity = suggestion # CA1859: Use concrete types when possible for improved performance
dotnet_diagnostic.CA1861.severity = suggestion # CA1861: Avoid constant arrays as arguments
dotnet_diagnostic.CA1863.severity = none # CA1863: Use 'CompositeFormat'
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x'
- name: Setup .NET 9.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: '9.0.x'
include-prerelease: true
- name: Version Information
run: |
dotnet --info
Expand Down
11 changes: 2 additions & 9 deletions Build/steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,10 @@ steps:
version: '7.0.x'

- task: UseDotNet@2
displayName: Install .NET 8.0 runtime for testing
inputs:
packageType: 'runtime'
version: '8.0.x'

- task: UseDotNet@2
displayName: Install .NET 9.0 SDK for build
displayName: Install .NET 8.0 SDK for build
inputs:
packageType: 'sdk'
version: '9.0.x'
includePreviewVersions: true
version: '8.0.x'

# Set Mono version on macOS
- ${{ if eq(parameters.os, 'macOS') }}:
Expand Down
2 changes: 1 addition & 1 deletion Src/DLR
144 changes: 72 additions & 72 deletions Src/IronPythonTest/EncodingTest.cs

Large diffs are not rendered by default.

396 changes: 198 additions & 198 deletions Src/IronPythonTest/EngineTest.cs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Src/IronPythonTest/Stress/Engine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void ScenarioXGC() {
ScriptScope scope = _pe.CreateScope();
scope.SetVariable("x", "Hello");
_pe.CreateScriptSourceFromFile(System.IO.Path.Combine(Common.InputTestDirectory, "simpleCommand.py")).Execute(scope);
Assert.AreEqual(_pe.CreateScriptSourceFromString("x").Execute<int>(scope), 1);
Assert.That(1, Is.EqualTo(_pe.CreateScriptSourceFromString("x").Execute<int>(scope)));
scope = null;
}

Expand Down

0 comments on commit b6384f0

Please sign in to comment.