Skip to content

Commit

Permalink
tests: shore up support for windows in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
seandstewart committed Jun 20, 2024
1 parent b36c7d6 commit 1680068
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tests/unit/marshal/test_routines.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ def test_uuid_marshaller(given_input, expected_output):

@pytest.mark.suite(
path=dict(
given_input=pathlib.Path("/path/to/file"), expected_output="/path/to/file"
given_input=pathlib.Path("/path/to/file"),
expected_output=str(pathlib.Path("/path/to/file")),
),
)
def test_path_marshaller(given_input, expected_output):
Expand Down
6 changes: 4 additions & 2 deletions tests/unit/test_refs.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from unittest import mock

import pytest
from typelib import refs

Expand Down Expand Up @@ -27,7 +29,7 @@ class RefClass: ...
no_module_provided=dict(
given_ref_name="str",
given_module_name=None,
expected_ref=refs.ForwardRef("str", module="__main__"),
expected_ref=refs.ForwardRef("str", module=mock.ANY),
),
module_provided=dict(
given_ref_name="str",
Expand All @@ -47,7 +49,7 @@ class RefClass: ...
module_from_caller=dict(
given_ref_name="UnknownClass",
given_module_name=None,
expected_ref=refs.ForwardRef("UnknownClass", module="__main__"),
expected_ref=refs.ForwardRef("UnknownClass", module=mock.ANY),
),
)
def test_forwardref(given_ref_name, given_module_name, expected_ref):
Expand Down

0 comments on commit 1680068

Please sign in to comment.