Skip to content

Commit

Permalink
fix: Ignore invalid miri tests
Browse files Browse the repository at this point in the history
The tests used `insta`, and miri doesn't like filesystems
  • Loading branch information
aborgna-q committed Mar 7, 2024
1 parent d93e795 commit 72c0049
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions quantinuum-hugr/src/hugr/views/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ fn node_connections(
///
/// The first parameter `test_name` is required due to insta and rstest limitations.
/// See https://github.com/la10736/rstest/issues/183
#[cfg_attr(miri, ignore)] // Opening files is not supported in (isolated) miri
#[rstest]
#[case::dfg("dot_dfg", sample_hugr().0)]
#[case::cfg("dot_cfg", crate::builder::test::simple_cfg_hugr())]
#[case::empty_dfg("dot_empty_dfg", crate::builder::test::simple_dfg_hugr())]
#[cfg_attr(miri, ignore)] // Opening files is not supported in (isolated) miri
fn dot_string(#[case] test_name: &str, #[case] h: Hugr) {
insta::assert_yaml_snapshot!(test_name, h.dot_string());
}
Expand All @@ -78,11 +78,11 @@ fn dot_string(#[case] test_name: &str, #[case] h: Hugr) {
///
/// The first parameter `test_name` is required due to insta and rstest limitations.
/// See https://github.com/la10736/rstest/issues/183
#[cfg_attr(miri, ignore)] // Opening files is not supported in (isolated) miri
#[rstest]
#[case::dfg("mmd_dfg", sample_hugr().0)]
#[case::cfg("mmd_cfg", crate::builder::test::simple_cfg_hugr())]
#[case::empty_dfg("mmd_empty_dfg", crate::builder::test::simple_dfg_hugr())]
#[cfg_attr(miri, ignore)] // Opening files is not supported in (isolated) miri
fn mermaid_string(#[case] test_name: &str, #[case] h: Hugr) {
insta::assert_snapshot!(test_name, h.mermaid_string());
}
Expand Down

0 comments on commit 72c0049

Please sign in to comment.