pub fn is_in_test(tcx: TyCtxt<'_>, hir_id: HirId) -> bool
Checks if the node is in a #[test] function or has any parent node marked #[cfg(test)]
#[test]
#[cfg(test)]