MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Unit testing using imported data

  • To: mathgroup at
  • Subject: [mg124178] Re: Unit testing using imported data
  • From: Adam Berry <adamb at>
  • Date: Wed, 11 Jan 2012 17:22:41 -0500 (EST)
  • Delivered-to:
  • References: <jeh5op$r66$> <>

On 1/11/12 3:22 AM, David wrote:
> On Jan 10, 5:00 am, David<dbco... at>  wrote:
>> I want to setup a unit test for functions I have made. The functions
>> perform computation on imported data. The data are HDF files. How can I setup the unit test so that the data gets imported for use in a unit test? The imported data is the input for the function.
> I should add that I want to use the built in .mt file in Wolfram
> Workbench. The Mathematica front end is not used. The help content in
> Workbench doesn't have any information on importing when using the .mt
> test files.

For these purposes you can consider that the mt file is executed 
sequentially, and you are not just limited to Test[...] expressions 
inside of it, so basically you would do something like;

data = Import[...]

	TestID -> "foo"

  • Prev by Date: Using Mathematica to create slides
  • Next by Date: Re: How to create palette buttons with tooltips?
  • Previous by thread: Re: Unit testing using imported data
  • Next by thread: Re: Unit testing using imported data