fix: enable clippy on tests (#870)
https://github.com/openai/codex/pull/855 added the clippy warning to disallow `unwrap()`, but apparently we were not verifying that tests were "clippy clean" in CI, so I ended up with a lot of local errors in VS Code. This turns on the check in CI and fixes the offenders.
This commit is contained in:
@@ -194,6 +194,7 @@ fn is_valid_sed_n_arg(arg: Option<&str>) -> bool {
|
||||
}
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#![allow(clippy::unwrap_used)]
|
||||
use super::*;
|
||||
|
||||
fn vec_str(args: &[&str]) -> Vec<String> {
|
||||
|
||||
@@ -179,7 +179,9 @@ fn install_network_seccomp_filter_on_current_thread() -> std::result::Result<(),
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests_linux {
|
||||
mod tests {
|
||||
#![allow(clippy::unwrap_used)]
|
||||
|
||||
use super::*;
|
||||
use crate::exec::ExecParams;
|
||||
use crate::exec::SandboxType;
|
||||
|
||||
@@ -163,6 +163,7 @@ impl std::ops::Deref for FunctionCallOutputPayload {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#![allow(clippy::unwrap_used)]
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -189,6 +189,7 @@ fn is_write_patch_constrained_to_writable_paths(
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#![allow(clippy::unwrap_used)]
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -20,6 +20,7 @@ pub(crate) enum UserNotification {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#![allow(clippy::unwrap_used)]
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user