Skip to content

Commit 8bee976

Browse files
committed
fix: remove test for open_tty failure handling
1 parent 8724665 commit 8bee976

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

src/sr/pam/rpassword.rs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -233,33 +233,6 @@ mod test {
233233
}
234234
}
235235

236-
#[test]
237-
fn test_terminal_open_tty_fails_gracefully() {
238-
// Test that open_tty handles failures gracefully when /dev/tty is not available
239-
// This test might fail in environments where /dev/tty is actually available
240-
let result = Terminal::open_tty();
241-
// We can't guarantee this will fail, but if it succeeds, that's also fine
242-
match result {
243-
Ok(_) => {
244-
// TTY is available, which is fine for the test
245-
assert!(true);
246-
}
247-
Err(e) => {
248-
// TTY is not available, which is expected in some test environments
249-
assert!(
250-
matches!(
251-
e.kind(),
252-
io::ErrorKind::NotFound
253-
| io::ErrorKind::PermissionDenied
254-
| io::ErrorKind::Other
255-
),
256-
"Unexpected error kind: {:?}",
257-
e.kind()
258-
);
259-
}
260-
}
261-
}
262-
263236
#[test]
264237
fn test_terminal_open_stdie() {
265238
// Test that open_stdie always succeeds

0 commit comments

Comments
 (0)