Skip to content

Avoid use of os.mknod() in Python testing for portability #2986

@samsrabin

Description

@samsrabin

It doesn't work everywhere; e.g., on my Mac. Instead, use the safer os.makedirs() for making empty directories or pathlib.Path.touch() for empty files.

Unit tests failing on my Mac because of this:

  • test_append_user_nl_step2: PermissionError at os.mknod(ufile)
  • test_run_phase: PermissionError in SSPCaseFake.create_clone() at os.mknod(os.path.join(newcase, "user_nl_clm"))

Metadata

Metadata

Assignees

No one assigned

    Labels

    bfbbit-for-bittest: pythonPass clm_pymods test suite plus Python sys/unit tests before mergingtestingadditions or changes to tests

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions