~christopher-hunt08/maus/beam_selection_development

« back to all changes in this revision

Viewing changes to tests/integration/test_utilities/test_geometry/test_get_geometry_ids.py

  • Committer: Chris Rogers
  • Date: 2012-10-13 18:43:00 UTC
  • mfrom: (663.6.137 merge)
  • mto: (663.6.204 merge)
  • mto: This revision was merged to the branch mainline in revision 680.
  • Revision ID: chris.rogers@stfc.ac.uk-20121013184300-ry9q81m45dmtgejr
Bring control room branch into line with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
                        "test_utilities", "test_geometry")
32
32
CONFIG_PATH_FILE = os.path.join(TEST_DIR, "test_get_ids_config.txt")
33
33
CONFIG_PATH_NO_FILE = os.path.join(TEST_DIR, "test_get_ids_config_nofile.txt")
34
 
INTERNET_CONNECTION = True
35
34
 
36
35
def run_get_geometries():
37
36
    """
38
 
    Run get_ids to generate some data. We only want to do this once, so I
39
 
    pull it out into a separate part of the test.
 
37
    Run get_geometry_ids to generate some data. 
40
38
    """
41
39
    file_name = os.environ['MAUS_ROOT_DIR']+'/tmp/get_geometry_ids_output'
42
40
    test_out = open(file_name, 'w')
51
49
 
52
50
class TestGetGeometryIDS(unittest.TestCase): #pylint:disable= R0904
53
51
    """
54
 
    This class has two tests. One checks that particles are accumulated into one
55
 
    vrml output file when the tag is selected in configuration defaults. The 
56
 
    second checks that the DrawByParticleID model has been registered so 
57
 
    particles will have specified colours in the vrml.
 
52
    This test calls the get_geometry_ids specifying the executable to
 
53
    both print to screen and create a file of geometry ids. It captures
 
54
    the screen print to file and checks the correct information can
 
55
    be found within it. It also checks the created file for the same
 
56
    information. It will not carry out the test if there is no 
 
57
    internet connection as it needs to call the cdb
58
58
    """
59
59
    def setUp(self): # pylint: disable=C0103, C0202
60
60
        """