Skip to content

iOS testbed does not correctly handle test arguments with spaces #141442

Description

@freakboy3742

Bug report

Bug description:

The iOS testbed can be given arguments to pass to the test suite - for example:

$ python Apple/testbed clone myproject
$ python myproject run -- test arg1 arg2 'arg 3' arg4

The arguments are then written into a test plan, and used to start the test suite.

The testbed runner correctly parses the command line arguments, and writes them into the test plan. However, even though Xcode's xctestplan format is a JSON document, and arguments are specified as an array, and arg 3 in the previous example is passed as a single quoted value in that array, Xcode itself does a raw concatenation of the array content. This means that any argument that contains a space is interpreted at runtime as multiple arguments.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Other

Linked PRs

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    3.13only security fixes
    3.14bugs and security fixes
    3.15bugs and security fixes
    on Nov 12, 2025
  2. freakboy3742 commented on Nov 12, 2025

    @freakboy3742
    ContributorAuthor

    This problem was introduced as part of #138018; that change introduced the use of the xctestplan, but it wasn't until I tried to run NumPy's test suite (which needs a pytest -m 'not slow' configuration) that the problem became apparent.

  3. added a commit that references this issue on Nov 12, 2025
  4. added 2 commits that reference this issue on Nov 12, 2025
  5. added 2 commits that reference this issue on Nov 12, 2025
  6. added a commit that references this issue on Dec 6, 2025
  7. added 4 commits that reference this issue on Feb 3, 2026
  8. added 3 commits that reference this issue on Jun 12, 2026
  9. added 3 commits that reference this issue on Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13only security fixes3.14bugs and security fixes3.15bugs and security fixesOS-iostype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions