Skip to content

Commit

Permalink
Debug Windows assertion failure
Browse files Browse the repository at this point in the history
  • Loading branch information
clyde-johnston committed Jun 11, 2023
1 parent c35a5c4 commit 06e36b9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/make-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ jobs:
python: '3.9'
runs-on: ${{ matrix.os }}
steps:
# Checkout code from GitHub
# Checkout pydsdl repository
- name: Check out pydsdl
uses: actions/checkout@v3

# Checkout public_regulated_data_types repository
- name: Check out public_regulated_data_types
uses: actions/checkout@v3
with:
Expand Down
18 changes: 9 additions & 9 deletions pydsdl/_namespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,32 +604,32 @@ def _unittest_common_usage_errors() -> None:

with tempfile.TemporaryDirectory() as directory:
di = Path(directory)
root_ns_dir = di / "foo"
root_ns_dir = di.joinpath("foo")
root_ns_dir.mkdir()

reports = [] # type: List[str]

_ensure_no_common_usage_errors(root_ns_dir, [], reports.append)
assert not reports
_ensure_no_common_usage_errors(root_ns_dir, [di / "baz"], reports.append)
_ensure_no_common_usage_errors(root_ns_dir, [di.joinpath("baz")], reports.append)
assert not reports

dir_dsdl = root_ns_dir / "dsdl"
dir_dsdl = root_ns_dir.joinpath("dsdl")
dir_dsdl.mkdir()
_ensure_no_common_usage_errors(dir_dsdl, [di / "baz"], reports.append)
_ensure_no_common_usage_errors(dir_dsdl, [di.joinpath("baz")], reports.append)
assert not reports # Because empty.

dir_dsdl_vscode = dir_dsdl / ".vscode"
dir_dsdl_vscode = dir_dsdl.joinpath(".vscode")
dir_dsdl_vscode.mkdir()
_ensure_no_common_usage_errors(dir_dsdl, [di / "baz"], reports.append)
_ensure_no_common_usage_errors(dir_dsdl, [di.joinpath("baz")], reports.append)
assert not reports # Because the name is not valid.

dir_dsdl_uavcan = dir_dsdl / "uavcan"
dir_dsdl_uavcan = dir_dsdl.joinpath("uavcan")
dir_dsdl_uavcan.mkdir()
_ensure_no_common_usage_errors(dir_dsdl, [di / "baz"], reports.append)
_ensure_no_common_usage_errors(dir_dsdl, [di.joinpath("baz")], reports.append)
(rep,) = reports
reports.clear()
assert str(dir_dsdl_uavcan).lower() in rep.lower()
assert str(dir_dsdl.joinpath("uavcan")).lower() in rep.lower()


def _unittest_nested_roots() -> None:
Expand Down

0 comments on commit 06e36b9

Please sign in to comment.