Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(624)  |  Call(624)  |  Derive(0)  |  Import(0)

src/s/e/SEDFitting-HEAD/python/tools/units/_quantities/tests/test_dimensionality.py   SEDFitting(Download)
    def test_addition(self):
        self.assertTrue(meter + meter is not meter)
        self.assertRaises(ValueError, op.add, meter, joule)
        self.assertRaises(ValueError, op.add, Joule, joule)
        self.assertRaises(TypeError, op.add, Joule, 0)
        self.assertRaises(TypeError, op.add, 0, joule)
    def test_inplace_addition(self):
        temp = meter.copy()
        temp += meter
        self.assertEqual(temp, meter)
        self.assertRaises(ValueError, op.iadd, meter, joule)

src/e/g/egads-0.5.7/egads/third-party/quantities/tests/test_dimensionality.py   egads(Download)
    def test_addition(self):
        self.assertTrue(meter + meter is not meter)
        self.assertRaises(ValueError, op.add, meter, joule)
        self.assertRaises(ValueError, op.add, Joule, joule)
        self.assertRaises(TypeError, op.add, Joule, 0)
        self.assertRaises(TypeError, op.add, 0, joule)
    def test_inplace_addition(self):
        temp = meter.copy()
        temp += meter
        self.assertEqual(temp, meter)
        self.assertRaises(ValueError, op.iadd, meter, joule)

src/s/e/SEDFitting-HEAD/python/quantities/tests/test_dimensionality.py   SEDFitting(Download)
    def test_addition(self):
        self.assertTrue(meter + meter is not meter)
        self.assertRaises(ValueError, op.add, meter, joule)
        self.assertRaises(ValueError, op.add, Joule, joule)
        self.assertRaises(TypeError, op.add, Joule, 0)
        self.assertRaises(TypeError, op.add, 0, joule)
    def test_inplace_addition(self):
        temp = meter.copy()
        temp += meter
        self.assertEqual(temp, meter)
        self.assertRaises(ValueError, op.iadd, meter, joule)

src/q/u/quantities-0.10.1/quantities/tests/test_dimensionality.py   quantities(Download)
    def test_addition(self):
        self.assertTrue(meter + meter is not meter)
        self.assertRaises(ValueError, op.add, meter, joule)
        self.assertRaises(ValueError, op.add, Joule, joule)
        self.assertRaises(TypeError, op.add, Joule, 0)
        self.assertRaises(TypeError, op.add, 0, joule)
    def test_inplace_addition(self):
        temp = meter.copy()
        temp += meter
        self.assertEqual(temp, meter)
        self.assertRaises(ValueError, op.iadd, meter, joule)

src/p/y/python-quantities-HEAD/quantities/tests/test_dimensionality.py   python-quantities(Download)
    def test_addition(self):
        self.assertTrue(meter + meter is not meter)
        self.assertRaises(ValueError, op.add, meter, joule)
        self.assertRaises(ValueError, op.add, Joule, joule)
        self.assertRaises(TypeError, op.add, Joule, 0)
        self.assertRaises(TypeError, op.add, 0, joule)
    def test_inplace_addition(self):
        temp = meter.copy()
        temp += meter
        self.assertEqual(temp, meter)
        self.assertRaises(ValueError, op.iadd, meter, joule)

src/s/e/SEDFitting-HEAD/python/tools/units/_quantities/tests/test_units.py   SEDFitting(Download)
            getattr(u, '__i%s__'%op)(val)
 
        self.assertRaises(AttributeError, setunits, pq.m, pq.ft)
        self.assertRaises(TypeError, inplace, 'add', pq.m, pq.m)
        self.assertRaises(TypeError, inplace, 'sub', pq.m, pq.m)
        self.assertRaises(TypeError, inplace, 'mul', pq.m, pq.m)
        self.assertRaises(TypeError, inplace, 'truediv', pq.m, pq.m)

src/e/g/egads-0.5.7/egads/third-party/quantities/tests/test_units.py   egads(Download)
            getattr(u, '__i%s__'%op)(val)
 
        self.assertRaises(AttributeError, setunits, pq.m, pq.ft)
        self.assertRaises(TypeError, inplace, 'add', pq.m, pq.m)
        self.assertRaises(TypeError, inplace, 'sub', pq.m, pq.m)
        self.assertRaises(TypeError, inplace, 'mul', pq.m, pq.m)
        self.assertRaises(TypeError, inplace, 'truediv', pq.m, pq.m)

src/s/e/SEDFitting-HEAD/python/quantities/tests/test_units.py   SEDFitting(Download)
            getattr(u, '__i%s__'%op)(val)
 
        self.assertRaises(AttributeError, setunits, pq.m, pq.ft)
        self.assertRaises(TypeError, inplace, 'add', pq.m, pq.m)
        self.assertRaises(TypeError, inplace, 'sub', pq.m, pq.m)
        self.assertRaises(TypeError, inplace, 'mul', pq.m, pq.m)
        self.assertRaises(TypeError, inplace, 'truediv', pq.m, pq.m)

src/s/e/SEDFitting-HEAD/python/tools/units/_quantities/tests/test_arithmetic.py   SEDFitting(Download)
        self.assertQuantityEqual(pq.ft + pq.m, 4.280839895 * pq.ft)
        self.assertQuantityEqual(op.iadd(1*pq.ft, 1*pq.m), 4.280839895 * pq.ft)
        self.assertRaises(ValueError, lambda: 10*pq.J + 3*pq.m)
        self.assertRaises(ValueError, lambda: op.iadd(10*pq.J, 3*pq.m))
 
            10*pq.m % (3*pq.m)
        )
        self.assertRaises(ValueError, lambda: 10*pq.J % (3*pq.m))
 
    def test_imod(self):
        self.assertQuantityEqual(x, 10*pq.m % (3*pq.m))
 
        self.assertRaises(ValueError, lambda: op.imod(10*pq.J, 3*pq.m))
 
    def test_fmod(self):
        self.assertQuantityEqual(np.fmod(10*pq.m, (3*pq.m)), 1*pq.m)
        self.assertRaises(ValueError, np.fmod, 10*pq.J, 3*pq.m)

src/q/u/quantities-0.10.1/quantities/tests/test_units.py   quantities(Download)
            getattr(u, '__i%s__'%op)(val)
 
        self.assertRaises(AttributeError, setunits, pq.m, pq.ft)
        self.assertRaises(TypeError, inplace, 'add', pq.m, pq.m)
        self.assertRaises(TypeError, inplace, 'sub', pq.m, pq.m)
        self.assertRaises(TypeError, inplace, 'mul', pq.m, pq.m)
        self.assertRaises(TypeError, inplace, 'truediv', pq.m, pq.m)

  1 | 2 | 3 | 4 | 5  Next