Did I find the right examples for you? yes no

All Samples(11)  |  Call(10)  |  Derive(0)  |  Import(1)

src/b/w/bw2data-0.17/bw2data/tests/utils.py   bw2data(Download)
# -*- coding: utf-8 -*-
from . import BW2DataTest
from .. import Database, Method, methods
from fixtures import biosphere
from ..utils import natural_sort, random_string, combine_methods, uncertainify
    def test_wrong_distribution(self):
        with self.assertRaises(AssertionError):
            uncertainify({}, sa.LognormalUncertainty)
 
    def test_factors_valid(self):
        with self.assertRaises(AssertionError):
            uncertainify({}, bounds_factor=-1)
        with self.assertRaises(TypeError):
            uncertainify({}, bounds_factor="foo")
            uncertainify({}, bounds_factor="foo")
        with self.assertRaises(AssertionError):
            uncertainify({}, sd_factor=-1)
        with self.assertRaises(TypeError):
            uncertainify({}, sd_factor="foo")