def script_that_increments_and_returns_scan_id(tmpdir):
    """
    Pytest fixture to return a path to a script with main() that increments
    the scan ID and adds the value to a queue.
    """
    path = tmpdir.join("script_for_scan_id.py")

    path.write(
        """
from oet.command import SCAN_ID_GENERATOR

def main(queue):
    queue.put(SCAN_ID_GENERATOR.next())
"""
    )
    return f"file://{str(path)}"