coverage: remove panic_unwind hack

This commit is contained in:
David Hewitt 2021-04-04 10:03:52 +01:00
parent e66231ae5d
commit dafbec7e54
3 changed files with 0 additions and 17 deletions

View File

@ -557,12 +557,6 @@ mod tests {
#[test]
#[should_panic(expected = "new panic")]
fn fetching_panic_exception_resumes_unwind() {
// TODO replace with #[cfg(panic = "unwind")] once stable
if !crate::cfg_panic_unwind() {
// panic to meet the expected abort in panic=abort :-/
panic!("new panic");
}
use crate::panic::PanicException;
let gil = Python::acquire_gil();

View File

@ -425,9 +425,3 @@ pub mod doc_test {
doctest!("guide/src/trait_bounds.md", guide_trait_bounds_md);
doctest!("guide/src/types.md", guide_types_md);
}
// interim helper until #[cfg(panic = ...)] is stable
#[cfg(test)]
fn cfg_panic_unwind() -> bool {
option_env!("RUSTFLAGS").map_or(true, |var| !var.contains("-Cpanic=abort"))
}

View File

@ -695,11 +695,6 @@ mod test {
#[test]
fn test_allow_threads_panics_safely() {
// TODO replace with #[cfg(panic = "unwind")] once stable
if !crate::cfg_panic_unwind() {
return;
}
let gil = Python::acquire_gil();
let py = gil.python();