cardano-wallet-test-utils-2020.12.8: Shared utilities for writing unit and property tests.
Copyright© 2018-2020 IOHK
LicenseApache-2.0
Safe HaskellNone
LanguageHaskell2010

Test.Utils.Paths

Description

Utility function for finding the package test data directory.

Synopsis

Documentation

getTestData :: Q Exp Source #

A TH function to get the test data directory.

It combines the current source file location and cabal file to locate the package directory in such a way that works in both the stack/cabal package build and ghci.

For the Nix build, rather than baking in a path that starts with /build, it makes the test data path relative to the current directory.

getTestDataPath :: FilePath -> Q Exp Source #

A variant of getTestData which lets you specify the test data FilePath relative to the package root directory.

inNixBuild :: IO Bool Source #

Infer from environment variables whether we are running within a Nix build (and not just a nix-shell).