docstr: File and parts.
docstr_tok: ["File","and","parts","."]
code: def test_file(self, invocation_path: Path) -> None:
      """File and parts."""
      assert resolve_collection_argument(
          invocation_path, "src/pkg/test.py"
      ) == (
          invocation_path / "src/pkg/test.py",
          [],
      )
      assert resolve_collection_argument(
          invocation_path, "src/pkg/test.py::"
      ) == (
          invocation_path / "src/pkg/test.py",
          [""],
      )
      assert resolve_collection_argument(
          invocation_path, "src/pkg/test.py::foo::bar"
      ) == (invocation_path / "src/pkg/test.py", ["foo", "bar"])
      assert resolve_collection_argument(
          invocation_path, "src/pkg/test.py::foo::bar::"
      ) == (invocation_path / "src/pkg/test.py", ["foo", "bar", ""])
  
imports: import argparse
  import os
  import re
  import sys
  from pathlib import Path
  from typing import Optional
  import pytest
  from _pytest.config import ExitCode
  from _pytest.config import UsageError
  from _pytest.main import resolve_collection_argument
  from _pytest.main import validate_basetemp
  from _pytest.pytester import Pytester
label_desc: Use image node_id 2 for calling the TestResolveCollectionArgument obj's underlying member method code with example usage: obj.test_file(invocation_path) without return types