def test_behaviour(self):
     """Test behaviour of elements in the dialog
     """
     myDialog = ShakemapImporter(PARENT)
     myDialog.use_output_default.setEnabled(True)
     my_grid_path = os.path.join(TESTDATA, 'grid.xml')
     myDialog.input_path.setText(my_grid_path)
     input_path = myDialog.input_path.text()
     output_path = myDialog.output_path.text()
     assert myDialog.isEnabled(), 'Output location should be disabled'
     expected_output_path = input_path[:-3] + 'tif'
     assert output_path == expected_output_path, \
         'Expected %s got %s' % (expected_output_path, output_path)
Example #2
0
 def test_behaviour(self):
     """Test behaviour of elements in the dialog
     """
     myDialog = ShakemapImporter(PARENT)
     myDialog.use_output_default.setEnabled(True)
     my_grid_path = os.path.join(TESTDATA, 'grid.xml')
     myDialog.input_path.setText(my_grid_path)
     input_path = myDialog.input_path.text()
     output_path = myDialog.output_path.text()
     assert myDialog.isEnabled(), 'Output location should be disabled'
     expected_output_path = input_path[:-3] + 'tif'
     assert output_path == expected_output_path, \
         'Expected %s got %s' % (expected_output_path, output_path)
    def test_behaviour(self):
        """Test behaviour of elements in the dialog
        """
        shakemap_importer_dialog = ShakemapImporter(PARENT)
        shakemap_importer_dialog.use_output_default.setEnabled(True)
        my_grid_path = os.path.join(TESTDATA, 'grid.xml')
        shakemap_importer_dialog.input_path.setText(my_grid_path)
        input_path = shakemap_importer_dialog.input_path.text()
        output_path = shakemap_importer_dialog.output_path.text()

        msg = 'Output location should be disabled'
        self.assertTrue(shakemap_importer_dialog.isEnabled(), msg)

        expected_output_path = input_path[:-3] + 'tif'
        msg = 'Expected %s got %s' % (expected_output_path, output_path)
        self.assertEqual(output_path, expected_output_path, msg)
Example #4
0
    def test_behaviour(self):
        """Test behaviour of elements in the dialog
        """
        shakemap_importer_dialog = ShakemapImporter(PARENT)
        shakemap_importer_dialog.use_output_default.setEnabled(True)
        my_grid_path = os.path.join(TESTDATA, 'grid.xml')
        shakemap_importer_dialog.input_path.setText(my_grid_path)
        input_path = shakemap_importer_dialog.input_path.text()
        output_path = shakemap_importer_dialog.output_path.text()

        msg = 'Output location should be disabled'
        self.assertTrue(shakemap_importer_dialog.isEnabled(), msg)

        expected_output_path = input_path[:-3] + 'tif'
        msg = 'Expected %s got %s' % (expected_output_path, output_path)
        self.assertEqual(output_path, expected_output_path, msg)