Skip to content

Commit 9cf31d8

Browse files
committed
Type tests, use newer pytest tmp_path, use net8.0
1 parent a6f96f3 commit 9cf31d8

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

example/example.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net80;netstandard20</TargetFrameworks>
3+
<TargetFrameworks>net8.0;netstandard2.0</TargetFrameworks>
44
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
55
</PropertyGroup>
66
<ItemGroup>

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Documentation = "https://pythonnet.github.io/clr-loader/"
3737

3838
[dependency-groups]
3939
dev = [
40-
"pytest"
40+
"pytest>=7.0"
4141
]
4242

4343
[tool.setuptools]

tests/test_common.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66

77

88
@pytest.fixture(scope="session")
9-
def example_netstandard(tmpdir_factory):
10-
return build_example(tmpdir_factory, "netstandard20")
9+
def example_netstandard(tmp_path_factory: pytest.TempPathFactory) -> Path:
10+
return build_example(tmp_path_factory, "netstandard2.0")
1111

1212

1313
@pytest.fixture(scope="session")
14-
def example_netcore(tmpdir_factory):
15-
return build_example(tmpdir_factory, "net60")
14+
def example_netcore(tmp_path_factory: pytest.TempPathFactory) -> Path:
15+
return build_example(tmp_path_factory, "net8.0")
1616

1717

18-
def build_example(tmpdir_factory, framework):
19-
out = Path(tmpdir_factory.mktemp(f"example-{framework}"))
18+
def build_example(tmp_path_factory: pytest.TempPathFactory, framework: str) -> Path:
19+
out = tmp_path_factory.mktemp(f"example-{framework}")
2020
proj_path = Path(__file__).parent.parent / "example" / "example.csproj"
2121

2222
check_call(["dotnet", "build", str(proj_path), "-o", str(out), "-f", framework])
@@ -96,7 +96,7 @@ def test_coreclr_command_line(example_netcore: Path):
9696
run_in_subprocess(_do_test_coreclr_command_line, example_netcore)
9797

9898

99-
def _do_test_coreclr_command_line(example_netcore):
99+
def _do_test_coreclr_command_line(example_netcore: Path):
100100
from clr_loader import get_coreclr_command_line
101101

102102
coreclr = get_coreclr_command_line(entry_dll=example_netcore / "example.dll")
@@ -118,7 +118,7 @@ def test_coreclr_autogenerated_runtimeconfig(example_netstandard: Path):
118118

119119

120120
def _do_test_coreclr_autogenerated_runtimeconfig(
121-
example_netstandard: Path, **properties
121+
example_netstandard: Path, **properties: str
122122
):
123123
from clr_loader import get_coreclr
124124

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)