Beispiel #1
0
    def test_get_inputs_from_pason_rop(self):
        """Tests that setting the inputs from a :class:`PasonData` object works.
        
        """
        pason_data = dripy.PasonData(TEST_PASON_DATA)
        drill_sim = DrillSim(self.drill_string, self.event,
                             self.solver_settings, TEST_WORKING_DIRECTORY,
                             TEST_ANALYSIS_NAME)
        drill_sim.get_pason_inputs(pason_data, show_plots=False)

        self.assertListEqual(drill_sim.pason_inputs['rop'][0][1000:1010],
                             TEST_EXPECTED_CLEANED_ROP)
Beispiel #2
0
 def test_build_adm_contents(self):
     """Tests that the event file created in the DrillSim directory has the correct contents.        
     
     """
     drill_sim = DrillSim(self.drill_string, self.event,
                          self.solver_settings, TEST_WORKING_DIRECTORY,
                          TEST_ANALYSIS_NAME)
     pason_data = dripy.PasonData(TEST_PASON_DATA)
     drill_sim.get_pason_inputs(pason_data, show_plots=False)
     drill_sim.build()
     adm_file = os.path.join(TEST_WORKING_DIRECTORY,
                             TEST_ANALYSIS_NAME + '.adm')
     n_adm_lines = len(open(adm_file, 'r').readlines())
     expected_n_adm_lines = 12538
     self.assertEqual(n_adm_lines, expected_n_adm_lines)