Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Update dependencies #1526

Merged
merged 1 commit into from
Sep 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/Analysis/Ast/Test/FluentAssertions/AssertionsUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,38 +188,38 @@ public static string DoubleEscape(string input)
=> input.Replace("\r", "\\\u200Br").Replace("\n", "\\\u200Bn").Replace("\t", @"\t");

[CustomAssertion]
public static Continuation AssertIsNotNull<T>(this AssertionScope assertionScope, T instance, string subjectName, string itemName, string accessorName)
public static Continuation AssertIsNotNull<T>(this IAssertionScope IAssertionScope, T instance, string subjectName, string itemName, string accessorName)
where T : class
=> assertionScope.ForCondition(!(instance is null))
=> IAssertionScope.ForCondition(!(instance is null))
.FailWith($"Expected {subjectName} to have {itemName}{{reason}}, but {accessorName} is null.");

[CustomAssertion]
public static Continuation AssertAtIndex<T, TItem>(this AssertionScope assertionScope, IReadOnlyList<T> collection, int index, string subjectName, string itemName)
where T : class => assertionScope.ForCondition(collection.Count > index)
public static Continuation AssertAtIndex<T, TItem>(this IAssertionScope IAssertionScope, IReadOnlyList<T> collection, int index, string subjectName, string itemName)
where T : class => IAssertionScope.ForCondition(collection.Count > index)
.FailWith($"Expected {subjectName} to have {itemName} of type {typeof(T).Name} at index {index}{{reason}}, but collection has only {collection.Count} items.", subjectName, itemName)
.Then
.ForCondition(collection[index] is TItem)
.FailWith($"Expected {subjectName} to have {itemName} of type `{typeof(T).Name}` at index {index}{{reason}}, but its type is `{collection[index].GetType().Name}`.");

[CustomAssertion]
public static Continuation AssertHasMember(this AssertionScope assertionScope, IMember m, string memberName, string analysisValueName, string memberPrintName, out IMember member) {
public static Continuation AssertHasMember(this IAssertionScope IAssertionScope, IMember m, string memberName, string analysisValueName, string memberPrintName, out IMember member) {
var t = m.GetPythonType();
t.Should().BeAssignableTo<IMemberContainer>();
try {
member = ((IMemberContainer)m).GetMember(memberName);
} catch (Exception e) {
member = null;
return assertionScope.FailWith($"Expected {analysisValueName} to have a {memberPrintName}{{reason}}, but {nameof(t.GetMember)} has failed with exception: {e}.");
return IAssertionScope.FailWith($"Expected {analysisValueName} to have a {memberPrintName}{{reason}}, but {nameof(t.GetMember)} has failed with exception: {e}.");
}

return assertionScope.ForCondition(!(member is null))
return IAssertionScope.ForCondition(!(member is null))
.FailWith($"Expected {analysisValueName} to have a {memberPrintName}{{reason}}.");
}

[CustomAssertion]
public static Continuation AssertHasMemberOfType<TMember>(this AssertionScope assertionScope, IPythonType type, string memberName, string analysisValueName, string memberPrintName, out TMember typedMember)
public static Continuation AssertHasMemberOfType<TMember>(this IAssertionScope IAssertionScope, IPythonType type, string memberName, string analysisValueName, string memberPrintName, out TMember typedMember)
where TMember : class, IPythonType {
var continuation = assertionScope.AssertHasMember(type, memberName, analysisValueName, memberPrintName, out var member)
var continuation = IAssertionScope.AssertHasMember(type, memberName, analysisValueName, memberPrintName, out var member)
.Then
.ForCondition(member is TMember)
.FailWith($"Expected {analysisValueName} to have a {memberPrintName} of type {typeof(TMember)}{{reason}}, but its type is {member.GetType()}.");
Expand Down
8 changes: 4 additions & 4 deletions src/Analysis/Ast/Test/Microsoft.Python.Analysis.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
<None Remove="app.config" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="Microsoft.Win32.Registry" Version="4.5.0" />
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.0.0" />
<PackageReference Include="MSTest.TestFramework" Version="2.0.0" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="NSubstitute" Version="4.0.0" />
<PackageReference Include="NSubstitute" Version="4.2.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Core\Impl\Microsoft.Python.Core.csproj" />
Expand Down
6 changes: 3 additions & 3 deletions src/Core/Test/Microsoft.Python.Core.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
<None Remove="app.config" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="Microsoft.Win32.Registry" Version="4.5.0" />
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.0.0" />
<PackageReference Include="MSTest.TestFramework" Version="2.0.0" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="2.2.0" />
<PackageReference Include="NewtonSoft.Json" Version="12.0.1" />
<PackageReference Include="StreamJsonRpc" Version="2.0.146" />
<PackageReference Include="NewtonSoft.Json" Version="12.0.2" />
<PackageReference Include="StreamJsonRpc" Version="2.1.55" />
</ItemGroup>
<ItemGroup Condition="$(AnalysisReference) != ''">
<Reference Include="Microsoft.Python.Analysis.Engine">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
<None Remove="app.config" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="Microsoft.Win32.Registry" Version="4.5.0" />
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.0.0" />
<PackageReference Include="MSTest.TestFramework" Version="2.0.0" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="NSubstitute" Version="4.0.0" />
<PackageReference Include="NSubstitute" Version="4.2.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Analysis\Ast\Impl\Microsoft.Python.Analysis.csproj" />
Expand Down
6 changes: 3 additions & 3 deletions src/Parsing/Test/Microsoft.Python.Parsing.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
<None Remove="app.config" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="Microsoft.Win32.Registry" Version="4.5.0" />
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.0.0" />
<PackageReference Include="MSTest.TestFramework" Version="2.0.0" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
Expand Down
4 changes: 2 additions & 2 deletions src/UnitTests/Core/Impl/UnitTests.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<ItemGroup>
<PackageReference Include="Ben.Demystifier" Version="0.1.4" />
<PackageReference Include="FluentAssertions" Version="5.4.0" />
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
<PackageReference Include="FluentAssertions" Version="5.9.0" />
<PackageReference Include="MSTest.TestFramework" Version="2.0.0" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
Expand Down