icecube.icetray.I3Test module

class icecube.icetray.I3Test.TestExampleScripts(methodName='runTest')

Bases: TestCase

This is a helper class to make it really easy for project maintainers to write tests for their example scripts.

NB : You must set self.project_name = “<project_name>”

You get I3_TESTDATA for free, since many examples might need this.

Here’s a simple example of how to use this:

#!/usr/bin/env python3

from icecube.icetray import I3Test

class TestSimpleExample(I3Test.TestExampleScripts):

project_name = “icetray”

def test_simple_example(self):

self.run_example(‘simple_example.py’)

unittest.main()

project_name: str
run_example(example_name, *args)
setUp()

Hook method for setting up the test fixture before exercising it.