Skip to content

Commit 211547c

Browse files
committed
Keep timeout tests focused on changed thread behavior
Drop three standalone tests of the unchanged shared time converter. Existing test_time covers its signed range and rounding; retain acquire conversion ordering, sentinel rounding, error precedence, and native wait-bound regressions. Assisted-by: OpenAI Codex:model version not exposed
1 parent 320f443 commit 211547c

1 file changed

Lines changed: 0 additions & 48 deletions

File tree

‎crates/vm/src/stdlib/time/pytime.rs‎

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -203,54 +203,6 @@ pub(crate) fn object_to_denominator(
203203
mod tests {
204204
use super::*;
205205

206-
#[test]
207-
fn timeout_rounding_preserves_nonzero_subnanosecond_values() {
208-
crate::Interpreter::without_stdlib(Default::default()).enter(|vm| {
209-
for (seconds, expected) in [(1e-300, 1), (-1e-300, -1), (0.0, 0), (-0.0, 0)] {
210-
let value = vm.ctx.new_float(seconds);
211-
assert_eq!(
212-
from_seconds_object(value.as_object(), Round::Up, vm).unwrap(),
213-
expected,
214-
);
215-
}
216-
});
217-
}
218-
219-
#[test]
220-
fn timeout_nanoseconds_reject_nonfinite_values() {
221-
crate::Interpreter::without_stdlib(Default::default()).enter(|vm| {
222-
for seconds in [f64::NAN, f64::INFINITY, f64::NEG_INFINITY] {
223-
let value = vm.ctx.new_float(seconds);
224-
let error = from_seconds_object(value.as_object(), Round::Up, vm).unwrap_err();
225-
let expected = if seconds.is_nan() {
226-
vm.ctx.exceptions.value_error
227-
} else {
228-
vm.ctx.exceptions.overflow_error
229-
};
230-
assert!(error.fast_isinstance(expected));
231-
}
232-
});
233-
}
234-
235-
#[test]
236-
fn timeout_integer_seconds_use_signed_nanosecond_bounds() {
237-
crate::Interpreter::without_stdlib(Default::default()).enter(|vm| {
238-
let max_seconds = i64::MAX / 1_000_000_000;
239-
for seconds in [max_seconds, -max_seconds] {
240-
let value = vm.ctx.new_int(seconds);
241-
assert_eq!(
242-
from_seconds_object(value.as_object(), Round::Up, vm).unwrap(),
243-
seconds * 1_000_000_000,
244-
);
245-
}
246-
for seconds in [max_seconds + 1, -max_seconds - 1, i64::MAX, i64::MIN] {
247-
let value = vm.ctx.new_int(seconds);
248-
let error = from_seconds_object(value.as_object(), Round::Up, vm).unwrap_err();
249-
assert!(error.fast_isinstance(vm.ctx.exceptions.overflow_error));
250-
}
251-
});
252-
}
253-
254206
#[test]
255207
fn thread_wait_bound_checks_rounded_up_microseconds() {
256208
crate::Interpreter::without_stdlib(Default::default()).enter(|vm| {

0 commit comments

Comments
 (0)