Only override --quickcheck-tests=N if N is not default value (100).
Some of the round-trip tests are set to do a maximum of 25 trials when the default value is given. Closes #4956.
This commit is contained in:
parent
85394d4034
commit
885cbfd420
2 changed files with 12 additions and 2 deletions
|
@ -7,6 +7,7 @@ import Data.Text (Text)
|
|||
import qualified Data.Text as T
|
||||
import Test.Tasty
|
||||
import Test.Tasty.QuickCheck
|
||||
import Test.Tasty.Options (IsOption(defaultValue))
|
||||
import Tests.Helpers
|
||||
import Text.Pandoc
|
||||
import Text.Pandoc.Arbitrary ()
|
||||
|
@ -77,5 +78,9 @@ tests = [ testGroup "base tag"
|
|||
, test htmlNativeDivs "<main> followed by text" $ "<main>main content</main>non-main content" =?>
|
||||
doc (divWith ("", [], [("role", "main")]) (plain (text "main content")) <> plain (text "non-main content"))
|
||||
]
|
||||
, testProperty "Round trip" (withMaxSuccess 25 roundTrip)
|
||||
, askOption $ \(QuickCheckTests numtests) ->
|
||||
testProperty "Round trip" $
|
||||
withMaxSuccess (if QuickCheckTests numtests == defaultValue
|
||||
then 25
|
||||
else numtests) roundTrip
|
||||
]
|
||||
|
|
|
@ -8,6 +8,7 @@ import Data.Text (Text)
|
|||
import qualified Data.Text as T
|
||||
import Test.Tasty
|
||||
import Test.Tasty.QuickCheck
|
||||
import Test.Tasty.Options (IsOption(defaultValue))
|
||||
import Tests.Helpers
|
||||
import Text.Pandoc
|
||||
import Text.Pandoc.Arbitrary ()
|
||||
|
@ -262,7 +263,11 @@ tests =
|
|||
]
|
||||
|
||||
, testGroup "Blocks"
|
||||
[ testProperty "Round trip" (withMaxSuccess 25 roundTrip)
|
||||
[ askOption $ \(QuickCheckTests numtests) ->
|
||||
testProperty "Round trip" $
|
||||
withMaxSuccess (if QuickCheckTests numtests == defaultValue
|
||||
then 25
|
||||
else numtests) roundTrip
|
||||
, "Block elements end paragraphs" =:
|
||||
T.unlines [ "First paragraph"
|
||||
, "----"
|
||||
|
|
Loading…
Add table
Reference in a new issue