From 43e3fb4533df6192ec7f9552a69cd1ff2bddf096 Mon Sep 17 00:00:00 2001 From: Patrick Thomson Date: Wed, 19 Jun 2019 17:22:09 -0400 Subject: [PATCH] Remove unnecessary use of `parallel`. --- test/Analysis/Go/Spec.hs | 2 +- test/Analysis/PHP/Spec.hs | 2 +- test/Analysis/Python/Spec.hs | 2 +- test/Analysis/Ruby/Spec.hs | 2 +- test/Analysis/TypeScript/Spec.hs | 2 +- test/Control/Abstract/Evaluator/Spec.hs | 2 +- test/Data/Diff/Spec.hs | 2 +- test/Data/Functor/Classes/Generic/Spec.hs | 2 +- test/Data/Source/Spec.hs | 2 +- test/Data/Term/Spec.hs | 2 +- test/Diffing/Algorithm/RWS/Spec.hs | 2 +- test/Diffing/Interpreter/Spec.hs | 2 +- test/Parsing/Spec.hs | 2 +- test/Rendering/TOC/Spec.hs | 2 +- test/Semantic/IO/Spec.hs | 4 +- test/Semantic/Spec.hs | 2 +- test/Spec.hs | 63 +++++++++++------------ test/Tags/Spec.hs | 2 +- 18 files changed, 48 insertions(+), 51 deletions(-) diff --git a/test/Analysis/Go/Spec.hs b/test/Analysis/Go/Spec.hs index e1cc2f357..16ed20613 100644 --- a/test/Analysis/Go/Spec.hs +++ b/test/Analysis/Go/Spec.hs @@ -8,7 +8,7 @@ import SpecHelpers spec :: (?session :: TaskSession) => Spec -spec = parallel $ do +spec = do describe "Go" $ do it "imports and wildcard imports" $ do (scopeGraph, (heap, res)) <- evaluate ["main.go", "foo/foo.go", "bar/bar.go", "bar/rab.go"] diff --git a/test/Analysis/PHP/Spec.hs b/test/Analysis/PHP/Spec.hs index 6f4f5099d..2cf1db083 100644 --- a/test/Analysis/PHP/Spec.hs +++ b/test/Analysis/PHP/Spec.hs @@ -9,7 +9,7 @@ import SpecHelpers spec :: (?session :: TaskSession) => Spec -spec = parallel $ do +spec = do describe "PHP" $ do xit "evaluates include and require" $ do (scopeGraph, (heap, res)) <- evaluate ["main.php", "foo.php", "bar.php"] diff --git a/test/Analysis/Python/Spec.hs b/test/Analysis/Python/Spec.hs index 6073fec50..8549a31c9 100644 --- a/test/Analysis/Python/Spec.hs +++ b/test/Analysis/Python/Spec.hs @@ -10,7 +10,7 @@ import SpecHelpers spec :: (?session :: TaskSession) => Spec -spec = parallel $ do +spec = do describe "Python" $ do it "imports" $ do (scopeGraph, (heap, res)) <- evaluate ["main.py", "a.py", "b/__init__.py", "b/c.py"] diff --git a/test/Analysis/Ruby/Spec.hs b/test/Analysis/Ruby/Spec.hs index dd04ca4f5..e8d3fc197 100644 --- a/test/Analysis/Ruby/Spec.hs +++ b/test/Analysis/Ruby/Spec.hs @@ -15,7 +15,7 @@ import SpecHelpers spec :: (?session :: TaskSession) => Spec -spec = parallel $ do +spec = do describe "Ruby" $ do it "evaluates require_relative" $ do (scopeGraph, (heap, res)) <- evaluate ["main.rb", "foo.rb"] diff --git a/test/Analysis/TypeScript/Spec.hs b/test/Analysis/TypeScript/Spec.hs index 113c5513e..3d56fc8ae 100644 --- a/test/Analysis/TypeScript/Spec.hs +++ b/test/Analysis/TypeScript/Spec.hs @@ -23,7 +23,7 @@ import qualified Language.TypeScript.Assignment as TypeScript import SpecHelpers spec :: (?session :: TaskSession) => Spec -spec = parallel $ do +spec = do describe "TypeScript" $ do it "qualified export from" $ do (scopeGraph, (heap, res)) <- evaluate ["main6.ts", "baz.ts", "foo.ts"] diff --git a/test/Control/Abstract/Evaluator/Spec.hs b/test/Control/Abstract/Evaluator/Spec.hs index c1d2cbe36..c7f2d9359 100644 --- a/test/Control/Abstract/Evaluator/Spec.hs +++ b/test/Control/Abstract/Evaluator/Spec.hs @@ -21,7 +21,7 @@ import SpecHelpers hiding (reassociate) import System.IO.Unsafe (unsafePerformIO) spec :: Spec -spec = parallel $ do +spec = do it "constructs integers" $ do (_, (_, (_, expected))) <- evaluate (integer 123) expected `shouldBe` Right (Value.Integer (Number.Integer 123)) diff --git a/test/Data/Diff/Spec.hs b/test/Data/Diff/Spec.hs index 4a4d1feb1..451dfc764 100644 --- a/test/Data/Diff/Spec.hs +++ b/test/Data/Diff/Spec.hs @@ -7,6 +7,6 @@ import Test.Hspec import Test.Hspec.LeanCheck spec :: Spec -spec = parallel $ do +spec = do prop "equality is reflexive" $ \ diff -> diff `shouldBe` (diff :: Diff ListableSyntax () ()) diff --git a/test/Data/Functor/Classes/Generic/Spec.hs b/test/Data/Functor/Classes/Generic/Spec.hs index 01d4e41a5..8afba0c42 100644 --- a/test/Data/Functor/Classes/Generic/Spec.hs +++ b/test/Data/Functor/Classes/Generic/Spec.hs @@ -7,7 +7,7 @@ import Test.Hspec import Test.Hspec.LeanCheck spec :: Spec -spec = parallel $ do +spec = do describe "Eq1" $ do describe "genericLiftEq" $ do prop "equivalent to derived (==) for product types" $ diff --git a/test/Data/Source/Spec.hs b/test/Data/Source/Spec.hs index 9d6b00c33..01aa30c01 100644 --- a/test/Data/Source/Spec.hs +++ b/test/Data/Source/Spec.hs @@ -70,7 +70,7 @@ testTree = Tasty.testGroup "Data.Source" ] spec :: Spec -spec = parallel $ do +spec = do describe "newlineIndices" $ do it "finds \\n" $ let source = "a\nb" in diff --git a/test/Data/Term/Spec.hs b/test/Data/Term/Spec.hs index 2c785547e..c6dd73d3a 100644 --- a/test/Data/Term/Spec.hs +++ b/test/Data/Term/Spec.hs @@ -8,7 +8,7 @@ import Test.Hspec.Expectations import Test.Hspec.LeanCheck spec :: Spec -spec = parallel $ do +spec = do describe "Term" $ do prop "equality is reflexive" $ \ a -> a `shouldBe` (a :: Term ListableSyntax ()) diff --git a/test/Diffing/Algorithm/RWS/Spec.hs b/test/Diffing/Algorithm/RWS/Spec.hs index d62a3aec0..36f9eeea4 100644 --- a/test/Diffing/Algorithm/RWS/Spec.hs +++ b/test/Diffing/Algorithm/RWS/Spec.hs @@ -16,7 +16,7 @@ import Test.Hspec.LeanCheck import SpecHelpers spec :: Spec -spec = parallel $ do +spec = do let positively = succ . abs describe "pqGramDecorator" $ do prop "produces grams with stems of the specified length" $ diff --git a/test/Diffing/Interpreter/Spec.hs b/test/Diffing/Interpreter/Spec.hs index 738a4fcaa..11d8940e9 100644 --- a/test/Diffing/Interpreter/Spec.hs +++ b/test/Diffing/Interpreter/Spec.hs @@ -21,7 +21,7 @@ import Test.LeanCheck.Core import SpecHelpers () spec :: Spec -spec = parallel $ do +spec = do describe "diffTerms" $ do it "returns a replacement when comparing two unicode equivalent terms" $ let termA = termIn emptyAnnotation (inject (Syntax.Identifier "t\776")) diff --git a/test/Parsing/Spec.hs b/test/Parsing/Spec.hs index f8e961655..7ccd638b8 100644 --- a/test/Parsing/Spec.hs +++ b/test/Parsing/Spec.hs @@ -12,7 +12,7 @@ import SpecHelpers import TreeSitter.JSON (tree_sitter_json, Grammar) spec :: Spec -spec = parallel $ do +spec = do describe "parseToAST" $ do let source = toJSONSource [1 :: Int .. 10000] let largeBlob = sourceBlob "large.json" JSON source diff --git a/test/Rendering/TOC/Spec.hs b/test/Rendering/TOC/Spec.hs index 4ebe8743c..69b60eede 100644 --- a/test/Rendering/TOC/Spec.hs +++ b/test/Rendering/TOC/Spec.hs @@ -28,7 +28,7 @@ import SpecHelpers spec :: Spec -spec = parallel $ do +spec = do describe "tableOfContentsBy" $ do prop "drops all nodes with the constant Nothing function" $ \ diff -> tableOfContentsBy (const Nothing :: a -> Maybe ()) (diff :: Diff ListableSyntax () ()) `shouldBe` [] diff --git a/test/Semantic/IO/Spec.hs b/test/Semantic/IO/Spec.hs index 4cc60d5ac..2f8fc3203 100644 --- a/test/Semantic/IO/Spec.hs +++ b/test/Semantic/IO/Spec.hs @@ -16,7 +16,7 @@ import qualified Semantic.Git as Git import Shelly (shelly, silently, cd, run_) spec :: Spec -spec = parallel $ do +spec = do describe "readBlobsFromGitRepo" $ do hasGit <- runIO $ isJust <$> findExecutable "git" when hasGit . it "should read from a git directory" $ do @@ -50,9 +50,7 @@ spec = parallel $ do let a = sourceBlob "method.rb" Ruby "def foo; end" let b = sourceBlob "method.rb" Ruby "def bar(x); end" it "returns blobs for valid JSON encoded diff input" $ do - putStrLn "step 1" blobs <- blobsFromFilePath "test/fixtures/cli/diff.json" - putStrLn "done" blobs `shouldBe` [Diffing a b] it "returns blobs when there's no before" $ do diff --git a/test/Semantic/Spec.hs b/test/Semantic/Spec.hs index 74bad5333..91a3b1d25 100644 --- a/test/Semantic/Spec.hs +++ b/test/Semantic/Spec.hs @@ -12,7 +12,7 @@ setBlobLanguage :: Language -> Blob -> Blob setBlobLanguage lang b = b { blobFile = (blobFile b) { fileLanguage = lang }} spec :: Spec -spec = parallel $ do +spec = do describe "parseBlob" $ do it "returns error if given an unknown language (json)" $ do output <- fmap runBuilder . runTaskOrDie $ parseTermBuilder TermJSONTree [ setBlobLanguage Unknown methodsBlob ] diff --git a/test/Spec.hs b/test/Spec.hs index d5ff3ab7c..ba4ae21cb 100644 --- a/test/Spec.hs +++ b/test/Spec.hs @@ -66,38 +66,37 @@ allTests = do legacySpecs :: (?session :: TaskSession) => Spec legacySpecs = do describe "Semantic.Stat" Semantic.Stat.Spec.spec - parallel $ do - describe "Analysis.Go" Analysis.Go.Spec.spec - describe "Analysis.PHP" Analysis.PHP.Spec.spec - describe "Analysis.Python" Analysis.Python.Spec.spec - describe "Analysis.Ruby" Analysis.Ruby.Spec.spec - describe "Analysis.TypeScript" Analysis.TypeScript.Spec.spec - describe "Assigning.Assignment" Assigning.Assignment.Spec.spec - describe "Control.Abstract.Evaluator" Control.Abstract.Evaluator.Spec.spec - describe "Data.Diff" Data.Diff.Spec.spec - describe "Data.Graph" Data.Graph.Spec.spec - describe "Data.Abstract.Path" Data.Abstract.Path.Spec.spec - describe "Data.Abstract.Name" Data.Abstract.Name.Spec.spec - describe "Data.Functor.Classes.Generic" Data.Functor.Classes.Generic.Spec.spec - describe "Data.Range" Data.Range.Spec.spec - describe "Data.Scientific" Data.Scientific.Spec.spec - describe "Data.Semigroup.App" Data.Semigroup.App.Spec.spec - describe "Data.Source" Data.Source.Spec.spec - describe "Data.Term" Data.Term.Spec.spec - describe "Diffing.Algorithm.RWS" Diffing.Algorithm.RWS.Spec.spec - describe "Diffing.Algorithm.SES" Diffing.Algorithm.SES.Spec.spec - describe "Diffing.Interpreter" Diffing.Interpreter.Spec.spec - describe "Graphing.Calls" Graphing.Calls.Spec.spec - describe "Numeric" Numeric.Spec.spec - describe "Rendering.TOC" Rendering.TOC.Spec.spec - describe "Reprinting.Spec" Reprinting.Spec.spec - describe "Rewriting.Go" Rewriting.Go.Spec.spec - describe "Rewriting.JSON" Rewriting.JSON.Spec.spec - describe "Rewriting.Python" Rewriting.Python.Spec.spec - describe "Tags.Spec" Tags.Spec.spec - describe "Semantic" Semantic.Spec.spec - describe "Semantic.IO" Semantic.IO.Spec.spec - describe "Parsing" Parsing.Spec.spec + describe "Analysis.Go" Analysis.Go.Spec.spec + describe "Analysis.PHP" Analysis.PHP.Spec.spec + describe "Analysis.Python" Analysis.Python.Spec.spec + describe "Analysis.Ruby" Analysis.Ruby.Spec.spec + describe "Analysis.TypeScript" Analysis.TypeScript.Spec.spec + describe "Assigning.Assignment" Assigning.Assignment.Spec.spec + describe "Control.Abstract.Evaluator" Control.Abstract.Evaluator.Spec.spec + describe "Data.Diff" Data.Diff.Spec.spec + describe "Data.Graph" Data.Graph.Spec.spec + describe "Data.Abstract.Path" Data.Abstract.Path.Spec.spec + describe "Data.Abstract.Name" Data.Abstract.Name.Spec.spec + describe "Data.Functor.Classes.Generic" Data.Functor.Classes.Generic.Spec.spec + describe "Data.Range" Data.Range.Spec.spec + describe "Data.Scientific" Data.Scientific.Spec.spec + describe "Data.Semigroup.App" Data.Semigroup.App.Spec.spec + describe "Data.Source" Data.Source.Spec.spec + describe "Data.Term" Data.Term.Spec.spec + describe "Diffing.Algorithm.RWS" Diffing.Algorithm.RWS.Spec.spec + describe "Diffing.Algorithm.SES" Diffing.Algorithm.SES.Spec.spec + describe "Diffing.Interpreter" Diffing.Interpreter.Spec.spec + describe "Graphing.Calls" Graphing.Calls.Spec.spec + describe "Numeric" Numeric.Spec.spec + describe "Rendering.TOC" Rendering.TOC.Spec.spec + describe "Reprinting.Spec" Reprinting.Spec.spec + describe "Rewriting.Go" Rewriting.Go.Spec.spec + describe "Rewriting.JSON" Rewriting.JSON.Spec.spec + describe "Rewriting.Python" Rewriting.Python.Spec.spec + describe "Tags.Spec" Tags.Spec.spec + describe "Semantic" Semantic.Spec.spec + describe "Semantic.IO" Semantic.IO.Spec.spec + describe "Parsing" Parsing.Spec.spec main :: IO () diff --git a/test/Tags/Spec.hs b/test/Tags/Spec.hs index f094648a0..eeb99b7eb 100644 --- a/test/Tags/Spec.hs +++ b/test/Tags/Spec.hs @@ -6,7 +6,7 @@ import Tags.Tagging spec :: Spec -spec = parallel $ do +spec = do describe "go" $ do it "produces tags for functions with docs" $ do (blob, tree) <- parseTestFile goParser "test/fixtures/go/tags/simple_functions.go"