Skip to content

Commit

Permalink
Add DynamoPythonTests to sln (#14407)
Browse files Browse the repository at this point in the history
* fix most memory leaks from opening and closing Dynamo Splash Screen (#14344)

* fixing mem leaks in progress

* fix test and remove todo

* 2.19.1 disable network traffic WIP (#14393)

* cherry pick analytics issue (#13328)

* update

* update

* null checking

* update

* Update CoreNodeModelWpfResources.Designer.cs

Co-authored-by: pinzart <[email protected]>

* Revert "cherry pick analytics issue (#13328)"

This reverts commit 6f9761d.

* cherry pick analytics issue (#13328) (#14085)

* update

* update

* null checking

* update

* Update CoreNodeModelWpfResources.Designer.cs

Co-authored-by: pinzart <[email protected]>

* Disable net traffic (#14083)

* disable net traffic example

* Update PackageManagerViewExtension.cs

* update

* Update DynamoModel.cs

* Update PackageManagerViewExtension.cs

* Update PackageManagerViewExtension.cs

---------

Co-authored-by: pinzart <[email protected]>

* Update PreferencesViewModel.cs: crash due to null feature flags (#14087)

* Update PreferencesViewModel.cs

* Update PackageManagerViewExtensionTests.cs

---------

Co-authored-by: pinzart <[email protected]>

* changes

* remove comment

* comments and disable notifications

---------

Co-authored-by: pinzart90 <[email protected]>
Co-authored-by: pinzart <[email protected]>

* add python tests

* move project

* revert

---------

Co-authored-by: pinzart90 <[email protected]>
Co-authored-by: pinzart <[email protected]>
  • Loading branch information
3 people authored Sep 19, 2023
1 parent 860a3ce commit 120adc7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 21 deletions.
7 changes: 7 additions & 0 deletions src/Dynamo.All.sln
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ViewExtensionLibraryTests",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfVisualizationTests", "..\test\VisualizationTests\WpfVisualizationTests.csproj", "{C4964946-B367-44EE-9ED2-451FF2A83D32}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DynamoPythonTests", "..\test\Libraries\DynamoPythonTests\DynamoPythonTests.csproj", "{773988FE-EDF6-45CB-A63F-482955EB3553}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -524,6 +526,10 @@ Global
{C4964946-B367-44EE-9ED2-451FF2A83D32}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C4964946-B367-44EE-9ED2-451FF2A83D32}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C4964946-B367-44EE-9ED2-451FF2A83D32}.Release|Any CPU.Build.0 = Release|Any CPU
{773988FE-EDF6-45CB-A63F-482955EB3553}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{773988FE-EDF6-45CB-A63F-482955EB3553}.Debug|Any CPU.Build.0 = Debug|Any CPU
{773988FE-EDF6-45CB-A63F-482955EB3553}.Release|Any CPU.ActiveCfg = Release|Any CPU
{773988FE-EDF6-45CB-A63F-482955EB3553}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -602,6 +608,7 @@ Global
{7DD8077A-201E-4C56-96C5-3C901A51BDF3} = {5B9B5B6B-0BA7-4606-B8E5-70C958346D57}
{AE7F2579-104A-4AF4-AA7B-614AE9E79279} = {5B9B5B6B-0BA7-4606-B8E5-70C958346D57}
{C4964946-B367-44EE-9ED2-451FF2A83D32} = {5B9B5B6B-0BA7-4606-B8E5-70C958346D57}
{773988FE-EDF6-45CB-A63F-482955EB3553} = {4CA0BC62-DCB3-456B-80D6-348247640BAB}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {89CB19C6-BF0A-4E6A-BFDA-79D143EAB59D}
Expand Down
8 changes: 3 additions & 5 deletions test/Libraries/DynamoPythonTests/CodeCompletionTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
Expand Down Expand Up @@ -42,8 +42,7 @@ public void SharedCoreCanReturnCLRCompletionData()

Assert.IsTrue(completionList.Any());
Assert.IsTrue(completionList.Intersect(new[] { "Hashtable", "Queue", "Stack" }).Count() == 3);
// Serial tests load an extra type (System.Collections.Immutable) in the Python engine
Assert.IsTrue(completionData.Length >= 29 && completionData.Length <= 30);
Assert.IsTrue(completionData.Length == 31);
}
}

Expand Down Expand Up @@ -237,8 +236,7 @@ public void CanImportSystemCollectionsLibraryAndGetCompletionData()

Assert.IsTrue(completionList.Any());
Assert.IsTrue(completionList.Intersect(new[] { "Hashtable", "Queue", "Stack" }).Count() == 3);
// Serial tests load an extra type (System.Collections.Immutable) in the Python engine
Assert.IsTrue(completionData.Length >= 29 && completionData.Length <= 30);
Assert.IsTrue(completionData.Length == 31);
}

[Test]
Expand Down
16 changes: 3 additions & 13 deletions test/Libraries/DynamoPythonTests/DynamoPythonTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,18 @@
<AssemblyName>DynamoPythonTests</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AvalonEdit" Version="6.3.0.90"/>
<PackageReference Include="NUnit" Version="2.6.3" />
<PackageReference Include="AvalonEdit" Version="6.3.0.90" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="DynamoVisualProgramming.LibG_229_0_0" Version="2.18.0.2485" />
<PackageReference Include="DynamicLanguageRuntime" Version="1.2.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="NUnitTestAdapter" Version="2.3.0" ExcludeAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<Reference Include="Python.Runtime">
<HintPath>..\..\..\extern\Python\Python.Runtime.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
</Reference>
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net48' ">
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Numerics" />
<Reference Include="Microsoft.Practices.Prism">
<HintPath>..\..\..\extern\prism\Microsoft.Practices.Prism.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\DynamoCoreWpf\DynamoCoreWpf.csproj">
<Project>{51BB6014-43F7-4F31-B8D3-E3C37EBEDAF4}</Project>
Expand Down
7 changes: 4 additions & 3 deletions test/Libraries/DynamoPythonTests/PythonEditTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
Expand All @@ -14,10 +14,11 @@
using PythonNodeModels;
using Dynamo.PythonServices;
using DynCmd = Dynamo.Models.DynamoModel;
using System.Threading;

namespace Dynamo.Tests
{
[RequiresSTA]
[RequiresThread(ApartmentState.STA)]
public class PythonEditTests : DynamoViewModelUnitTest
{
protected override void GetLibrariesToPreload(List<string> libraries)
Expand Down Expand Up @@ -787,4 +788,4 @@ def get_data(self):
}
}
}
}
}

0 comments on commit 120adc7

Please sign in to comment.