From 2ccdd22919e930b5b12d19ad8a934aa586734554 Mon Sep 17 00:00:00 2001 From: Kenneth MacKenzie Date: Sat, 4 Jan 2025 05:53:05 +0100 Subject: [PATCH] Use ignoreTest instead of expectFail (#6767) --- plutus-conformance/src/PlutusConformance/Common.hs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plutus-conformance/src/PlutusConformance/Common.hs b/plutus-conformance/src/PlutusConformance/Common.hs index cf53c80c893..a38b7019695 100644 --- a/plutus-conformance/src/PlutusConformance/Common.hs +++ b/plutus-conformance/src/PlutusConformance/Common.hs @@ -25,7 +25,7 @@ import Data.Text.IO qualified as T import System.Directory import System.FilePath (takeBaseName, takeFileName, (<.>), ()) import Test.Tasty (defaultMain, testGroup) -import Test.Tasty.ExpectedFailure (expectFail) +import Test.Tasty.ExpectedFailure (ignoreTest) import Test.Tasty.Extras (goldenVsDocM) import Test.Tasty.Golden (findByExtension) import Test.Tasty.Golden.Advanced (goldenTest) @@ -154,7 +154,12 @@ discoverTests eval modelParams evaluationFailureExpected budgetFailureExpected = possiblyFailingTest :: Bool -> TestTree -> TestTree possiblyFailingTest failureExpected test = if failureExpected - then expectFail test + then ignoreTest test + -- TODO: ^ this should really be `expectFail`, but that behaves strangely with `--accept` + -- (the golden files for the failing tests get updated: see + -- https://github.com/IntersectMBO/plutus/issues/6714 and + -- https://github.com/nomeata/tasty-expected-failure/issues/27. If/when that gets fixed + -- `ignoreTest` should be changed to `expectFail`. else test -- | Turn the expected file content in text to a `UplcProg` unless the expected result