Skip to content

Commit 689c1fc

Browse files
filmorvmuriart
authored andcommitted
Add Initialize test and update NUnit to 3.5.0
1 parent 4d8a8e9 commit 689c1fc

File tree

3 files changed

+32
-5
lines changed

3 files changed

+32
-5
lines changed

src/embed_tests/InitializeTest.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using NUnit.Framework;
2+
using Python.Runtime;
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Linq;
6+
using System.Text;
7+
8+
namespace Python.EmbeddingTest
9+
{
10+
public class InitializeTest
11+
{
12+
[Test]
13+
public static void Test()
14+
{
15+
PythonEngine.Initialize();
16+
PythonEngine.Shutdown();
17+
18+
PythonEngine.Initialize();
19+
PythonEngine.Shutdown();
20+
}
21+
}
22+
}

src/embed_tests/Python.EmbeddingTest.csproj

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,20 +128,23 @@
128128
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
129129
</PropertyGroup>
130130
<ItemGroup>
131+
<Reference Include="nunit.framework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
132+
<HintPath>..\..\packages\NUnit.3.5.0\lib\net40\nunit.framework.dll</HintPath>
133+
<Private>True</Private>
134+
</Reference>
131135
<Reference Include="System" />
132136
<Reference Include="System.Core">
133137
<RequiredTargetFramework>3.5</RequiredTargetFramework>
134138
</Reference>
135-
<Reference Include="nunit.framework">
136-
<HintPath>..\..\packages\NUnit.2.6.2\lib\nunit.framework.dll</HintPath>
137-
</Reference>
138139
</ItemGroup>
139140
<ItemGroup>
140141
<None Include="Embeddingtest.nunit" />
141142
<None Include="..\pythonnet.snk" />
142143
<None Include="packages.config" />
144+
<None Include="pythonnet.snk" Condition="Exists('pythonnet.snk')" />
143145
</ItemGroup>
144146
<ItemGroup>
147+
<Compile Include="InitializeTest.cs" />
145148
<Compile Include="pyimport.cs" />
146149
<Compile Include="pyiter.cs">
147150
<SubType>Code</SubType>
@@ -172,6 +175,9 @@
172175
<Name>Python.Runtime</Name>
173176
</ProjectReference>
174177
</ItemGroup>
178+
<ItemGroup>
179+
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
180+
</ItemGroup>
175181
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
176182
<ProjectExtensions>
177183
<VisualStudio AllowExistingFolder="true" />

src/embed_tests/packages.config

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
32
<packages>
4-
<package id="NUnit" version="2.6.2" targetFramework="net40" />
3+
<package id="NUnit" version="3.5.0" targetFramework="net40" />
54
</packages>

0 commit comments

Comments
 (0)