Skip to content

Running tests on Windows causes cmd windows to rapidly pop up and disappear #5991

Closed
@Michael0x2a

Description

@Michael0x2a

When I try running the tests on Windows, after a certain point the tests will suddenly start spawning and killing cmd windows rapidly. Each window shows up for a fraction of a second, and disappears.

From one perspective, this is a non-issue: the temporary windows always disappear and the tests appear to finish and complete successfully. On the other hand, it's sort of alarming: I ran tests and switched over to my browser, and had a mild moment of panic when these cmd windows suddenly starting showing up and stealing focus.

I'm assuming this related to the recent work we've been doing with the windows daemon code: I can repro this fairly quickly by running pytest -k Daemon using both Powershell and the standard command prompt on Windows 10, and this behavior appears to have been introduced by abd319a.

I think ideally we'd stop making these windows appear and disappear. If that's not possible, we could instead maybe do one of the following:

  1. Have the windows spawn in the background (so they don't steal focus).
  2. Move the daemon-related tests out of pytest-fast or something so that users can opt-out of these tests by running py -3 ./runtests.py pytest-fast or something similar.
  3. Document that this is expected behavior somewhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions