Skip to content

Commit 2b7b33a

Browse files
committed
fix: send pytest output to stderr portably for sqb test --json
1 parent 9f2fbe0 commit 2b7b33a

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • crates/sqlbuild-python/src/bindings/_helpers/sql_test_command

‎crates/sqlbuild-python/src/bindings/_helpers/sql_test_command/python_tests.rs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! The project's Python tests, which a local `sqb test` runs with pytest after its SQL tests.
22
33
use std::collections::BTreeSet;
4-
use std::os::fd::AsFd;
54
use std::path::{Path, PathBuf};
65
use std::process::{Command, ExitStatus, Stdio};
76
use std::time::Instant;
@@ -166,7 +165,7 @@ pub(crate) fn run_python_tests(
166165
.env("PYTHONPATH", python_path(&project_dir)?)
167166
.stdin(Stdio::null());
168167
if native_field(request, "json_output")?.is_truthy()? {
169-
command.stdout(Stdio::from(std::io::stderr().as_fd().try_clone_to_owned()?));
168+
command.stdout(Stdio::from(std::io::stderr()));
170169
}
171170
let started: Instant = Instant::now();
172171
let status: ExitStatus = py

0 commit comments

Comments
 (0)