tests: import cleanups
This commit is contained in:
		
							parent
							
								
									a8031de729
								
							
						
					
					
						commit
						7ab8bc2685
					
				| @ -4,9 +4,9 @@ | |||||||
| 
 | 
 | ||||||
| module Hledger.Utils.Test ( | module Hledger.Utils.Test ( | ||||||
|   -- * easytest |   -- * easytest | ||||||
|    module E |    module EasyTest | ||||||
|   ,runEasyTests |   ,runEasyTests | ||||||
|   ,Hledger.Utils.Test.tests |   ,tests | ||||||
|   ,_tests |   ,_tests | ||||||
|   ,test |   ,test | ||||||
|   ,_test |   ,_test | ||||||
| @ -15,7 +15,7 @@ module Hledger.Utils.Test ( | |||||||
|   ,expectParseEq |   ,expectParseEq | ||||||
|   ,expectParseEqIO |   ,expectParseEqIO | ||||||
|   -- * HUnit |   -- * HUnit | ||||||
|   ,module U |   ,module Test.HUnit | ||||||
|   ,runHunitTests |   ,runHunitTests | ||||||
|   ,assertParse |   ,assertParse | ||||||
|   ,assertParseFailure |   ,assertParseFailure | ||||||
| @ -41,10 +41,10 @@ import System.IO | |||||||
| import Text.Megaparsec | import Text.Megaparsec | ||||||
| import Text.Megaparsec.Custom | import Text.Megaparsec.Custom | ||||||
| 
 | 
 | ||||||
| import EasyTest as E hiding (char, char', tests) | import EasyTest hiding (char, char', tests)  -- reexported | ||||||
| import EasyTest (tests) | import qualified EasyTest as E               -- used here | ||||||
| import Test.HUnit as U hiding (Test, test) | import Test.HUnit hiding (Test, test)        -- reexported | ||||||
| import qualified Test.HUnit as U (Test) | import qualified Test.HUnit as U             -- used here | ||||||
| 
 | 
 | ||||||
| import Hledger.Utils.Debug (pshow) | import Hledger.Utils.Debug (pshow) | ||||||
| import Hledger.Utils.Parse (parseWithState) | import Hledger.Utils.Parse (parseWithState) | ||||||
| @ -70,11 +70,11 @@ _it = _test | |||||||
| 
 | 
 | ||||||
| -- | Name and group a list of tests. Combines easytest's "scope" and "tests". | -- | Name and group a list of tests. Combines easytest's "scope" and "tests". | ||||||
| tests :: T.Text -> [E.Test ()] -> E.Test ()  | tests :: T.Text -> [E.Test ()] -> E.Test ()  | ||||||
| tests name = E.scope name . EasyTest.tests | tests name = E.scope name . E.tests | ||||||
| 
 | 
 | ||||||
| -- | Skip the given list of tests, with the same type signature as "group". | -- | Skip the given list of tests, with the same type signature as "group". | ||||||
| _tests :: T.Text -> [E.Test ()] -> E.Test ()  | _tests :: T.Text -> [E.Test ()] -> E.Test ()  | ||||||
| _tests _name = (E.skip >>) . EasyTest.tests | _tests _name = (E.skip >>) . E.tests | ||||||
| 
 | 
 | ||||||
| -- | Run some easytests, returning True if there was a problem. Catches ExitCode. | -- | Run some easytests, returning True if there was a problem. Catches ExitCode. | ||||||
| -- With arguments, runs only tests in the scope named by the first argument | -- With arguments, runs only tests in the scope named by the first argument | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user