Skip to content

Re-enable the domain reload tests #1404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 3, 2021
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build-test:
name: Build and Test
runs-on: ${{ matrix.os }}-latest
timeout-minutes: 5
timeout-minutes: 7

strategy:
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ build-backend = "setuptools.build_meta"
[tool.pytest.ini_options]
xfail_strict = true
testpaths = [
"tests",
"tests"
]
2 changes: 1 addition & 1 deletion pythonnet.sln
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Python.Test", "src\testing\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Python.PerformanceTests", "src\perf_tests\Python.PerformanceTests.csproj", "{4F2EA4A1-7ECA-48B5-8077-7A3C366F9931}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Python.DomainReloadTests", "src\domain_tests\Python.DomainReloadTests.csproj", "{F2FB6DA3-318E-4F30-9A1F-932C667E38C5}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Python.DomainReloadTests", "tests\domain_tests\Python.DomainReloadTests.csproj", "{F2FB6DA3-318E-4F30-9A1F-932C667E38C5}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Repo", "Repo", "{441A0123-F4C6-4EE4-9AEE-315FD79BE2D5}"
ProjectSection(SolutionItems) = preProject
Expand Down
7 changes: 0 additions & 7 deletions src/domain_tests/conftest.py

This file was deleted.

17 changes: 17 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ def pytest_addoption(parser):
help="Must be one of default, netcore, netfx and mono"
)

collect_ignore = []

def pytest_configure(config):
global bin_path
if "clr" in sys.modules:
Expand Down Expand Up @@ -73,6 +75,21 @@ def pytest_configure(config):
import clr
clr.AddReference("Python.Test")

soft_mode = False
try:
os.environ['PYTHONNET_SHUTDOWN_MODE'] == 'Soft'
except: pass

if config.getoption("--runtime") == "netcore" or soft_mode\
:
collect_ignore.append("domain_tests/test_domain_reload.py")
else:
domain_tests_dir = os.path.join(os.path.dirname(__file__), "domain_tests")
bin_path = os.path.join(domain_tests_dir, "bin")
check_call(["dotnet", "build", domain_tests_dir, "-o", bin_path])




def pytest_unconfigure(config):
global bin_path
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\runtime\Python.Runtime.csproj" />
<ProjectReference Include="..\..\src\runtime\Python.Runtime.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
File renamed without changes.