Skip to content

Commit 005a476

Browse files
committed
(wip)
1 parent 9591cec commit 005a476

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

src/domain_tests/Python.DomainReloadTests.15.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
44
<PropertyGroup>

src/domain_tests/TestRunner.cs

+6-3
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public static int Main()
9292
}}
9393
catch (PythonException pe)
9494
{{
95-
throw new ArgumentException(message:pe.Message);
95+
throw new ArgumentException(message:pe.Message+"" ""+pe.StackTrace);
9696
}}
9797
return 0;
9898
}}
@@ -103,11 +103,13 @@ public static int Main()
103103

104104
public static int Main(string[] args)
105105
{
106-
Console.WriteLine($"Testing with arguments: {string.Join(", ", args)}");
107106
if (args.Length < 3)
108107
{
109-
return 123;
108+
args = new string[] { "public static int TestMember = 2;", "", "TestMember" };
109+
// return 123;
110110
}
111+
Console.WriteLine($"Testing with arguments: {string.Join(", ", args)}");
112+
111113
var tempFolderPython = Path.Combine(Path.GetTempPath(), "Python.Runtime.dll");
112114
if (File.Exists(tempFolderPython))
113115
{
@@ -173,6 +175,7 @@ static string CreateCaseRunnerAssembly(string shutdownMode = "ShutdownMode.Reloa
173175

174176
static string CreateAssembly(string name, string code, bool exe = false)
175177
{
178+
//Console.WriteLine(code);
176179
// Never return or hold the Assembly instance. This will cause
177180
// the assembly to be loaded into the current domain and this
178181
// interferes with the tests. The Domain can execute fine from a

src/domain_tests/test_domain_reload.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ def runit(m1, m2, member):
1010
def test_remove_method():
1111

1212
m1 = 'public static void TestMethod() {Console.WriteLine("from test method");}'
13-
m2 = ''
13+
m2 = 'public static void TestMethod2() {Console.WriteLine("from test method");}'
1414
member = 'TestMethod'
1515
runit(m1, m2, member)
1616

1717
def test_remove_member():
1818

1919
m1 = 'public static int TestMember = -1;'
20-
m2 = ''
20+
m2 = 'public static int TestMember2 = -1;'
2121
member = 'TestMember'
2222
runit(m1, m2, member)

0 commit comments

Comments
 (0)