예제 #1
0
 def test_existing_module_in_package(self):
     self.assertIsNotNone(search_module('openquake.baselib.general'))
예제 #2
0
 def test_non_existing_module_simple(self):
     self.assertIsNone(search_module('do_not_exist'))
예제 #3
0
 def test_non_existing_module_in_package(self):
     self.assertIsNone(search_module('openquake.do_not_exist'))
예제 #4
0
 def test_existing_module_in_package(self):
     self.assertIsNotNone(search_module('openquake.baselib.general'))
예제 #5
0
 def test_existing_module_simple(self):
     self.assertIsNotNone(search_module('os'))
예제 #6
0
 def test_non_existing_module_simple(self):
     self.assertIsNone(search_module('do_not_exist'))
예제 #7
0
 def test_non_existing_module_in_package(self):
     self.assertIsNone(search_module('openquake.do_not_exist'))
예제 #8
0
 def test_existing_module_simple(self):
     self.assertIsNotNone(search_module('os'))
예제 #9
0
# as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# OpenQuake Risklib is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public
# License along with OpenQuake Risklib. If not, see
# <http://www.gnu.org/licenses/>.

import os
import sys
from openquake.risklib.scientific import (
    VulnerabilityFunction, DegenerateDistribution, classical)
from openquake.baselib.general import search_module
from openquake.hazardlib.general import git_suffix

__all__ = ["VulnerabilityFunction", "DegenerateDistribution", "classical"]

# the version is managed by packager.sh with a sed
__version__ = '0.8.0'
__version__ += git_suffix(__file__)

path = search_module('openquake.commonlib.general')
if path:
    sys.exit('Found an obsolete version of commonlib; '
             'please remove %s and/or fix your PYTHONPATH'
             % os.path.dirname(path))
예제 #10
0
 def test_existing_module_in_package(self):
     # this test may fail if oq-risklib is not on top of your PYTHONPATH
     self.assertIsNotNone(search_module('openquake.baselib.general'))
예제 #11
0
# modify it under the terms of the GNU Affero General Public License
# as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# OpenQuake Risklib is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public
# License along with OpenQuake Risklib. If not, see
# <http://www.gnu.org/licenses/>.

import os
import sys
from openquake.risklib.scientific import (VulnerabilityFunction,
                                          DegenerateDistribution, classical)
from openquake.baselib.general import search_module, git_suffix

__all__ = ["VulnerabilityFunction", "DegenerateDistribution", "classical"]

# the version is managed by packager.sh with a sed
__version__ = '0.9.0'
__version__ += git_suffix(__file__)

path = search_module('openquake.commonlib.general')
if path:
    sys.exit('Found an obsolete version of commonlib; '
             'please remove %s and/or fix your PYTHONPATH' %
             os.path.dirname(path))
예제 #12
0
 def test_existing_module_in_package(self):
     # this test may fail if oq-risklib is not on top of your PYTHONPATH
     self.assertIsNotNone(search_module('openquake.baselib.general'))