From aa5334c1b15ddee495e6f7a8fdeee5a9f07a048d Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 29 Apr 2025 18:04:50 -0700 Subject: [PATCH] use sys.platform in testing to make pre-commit work on windows --- reflex/testing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reflex/testing.py b/reflex/testing.py index d0c6a32d3d8..973bc75654d 100644 --- a/reflex/testing.py +++ b/reflex/testing.py @@ -14,6 +14,7 @@ import socket import socketserver import subprocess +import sys import textwrap import threading import time @@ -470,7 +471,7 @@ def stop(self) -> None: frontend_children = psutil.Process(self.frontend_process.pid).children( recursive=True, ) - if platform.system() == "Windows": + if sys.platform == "win32": self.frontend_process.terminate() else: pgrp = os.getpgid(self.frontend_process.pid)