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

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

src/s/e/SEDFitting-HEAD/python/tools/units/_quantities/tests/test_dimensionality.py   SEDFitting(Download)
    def test_dimensionality_str(self):
        self.assertEqual(str(meter), meter_str)
        self.assertEqual(joule.string, joule_str)
        self.assertEqual(joule.unicode, joule_uni)
        self.assertEqual(joule.latex, joule_tex)
        self.assertEqual(Joule.string, 'J')

src/e/g/egads-0.5.7/egads/third-party/quantities/tests/test_dimensionality.py   egads(Download)
    def test_dimensionality_str(self):
        self.assertEqual(str(meter), meter_str)
        self.assertEqual(joule.string, joule_str)
        self.assertEqual(joule.unicode, joule_uni)
        self.assertEqual(joule.latex, joule_tex)
        self.assertEqual(Joule.string, 'J')

src/s/e/SEDFitting-HEAD/python/quantities/tests/test_dimensionality.py   SEDFitting(Download)
    def test_dimensionality_str(self):
        self.assertEqual(str(meter), meter_str)
        self.assertEqual(joule.string, joule_str)
        self.assertEqual(joule.unicode, joule_uni)
        self.assertEqual(joule.latex, joule_tex)
        self.assertEqual(Joule.string, 'J')

src/s/e/SEDFitting-HEAD/python/tools/units/_quantities/tests/test_comparison.py   SEDFitting(Download)
    def test_scalar_equality(self):
        self.assertEqual(pq.J == pq.J, [True])
        self.assertEqual(1*pq.J == pq.J, [True])
        self.assertEqual(str(1*pq.J) == '1.0 J', True)
        self.assertEqual(pq.J == pq.kg*pq.m**2/pq.s**2, [True])
 
        self.assertEqual(pq.J == pq.erg, [False])

src/q/u/quantities-0.10.1/quantities/tests/test_dimensionality.py   quantities(Download)
    def test_dimensionality_str(self):
        self.assertEqual(str(meter), meter_str)
        self.assertEqual(joule.string, joule_str)
        self.assertEqual(joule.unicode, joule_uni)
        self.assertEqual(joule.latex, joule_tex)
        self.assertEqual(Joule.string, 'J')

src/e/g/egads-0.5.7/egads/third-party/quantities/tests/test_comparison.py   egads(Download)
    def test_scalar_equality(self):
        self.assertEqual(pq.J == pq.J, [True])
        self.assertEqual(1*pq.J == pq.J, [True])
        self.assertEqual(str(1*pq.J) == '1.0 J', True)
        self.assertEqual(pq.J == pq.kg*pq.m**2/pq.s**2, [True])
 
        self.assertEqual(pq.J == pq.erg, [False])

src/s/e/SEDFitting-HEAD/python/quantities/tests/test_comparison.py   SEDFitting(Download)
    def test_scalar_equality(self):
        self.assertEqual(pq.J == pq.J, [True])
        self.assertEqual(1*pq.J == pq.J, [True])
        self.assertEqual(str(1*pq.J) == '1.0 J', True)
        self.assertEqual(pq.J == pq.kg*pq.m**2/pq.s**2, [True])
 
        self.assertEqual(pq.J == pq.erg, [False])

src/p/y/python-quantities-HEAD/quantities/tests/test_dimensionality.py   python-quantities(Download)
    def test_dimensionality_str(self):
        self.assertEqual(str(meter), meter_str)
        self.assertEqual(joule.string, joule_str)
        self.assertEqual(joule.unicode, joule_uni)
        self.assertEqual(joule.latex, joule_tex)
        self.assertEqual(Joule.string, 'J')

src/h/5/h5py-2.3.0/h5py/tests/test_file.py   h5py(Download)
        with File(fname) as f:
            self.assertTrue(f)
            self.assertEqual(f.mode, 'r+')
 
        # Existing readonly file; open read-only
        os.chmod(fname, stat.S_IREAD)
        try:
            with File(fname) as f:
                self.assertTrue(f)
                self.assertEqual(f.mode, 'r')
    def test_mode_attr(self):
        """ Mode equivalent can be retrieved via property """
        fname = self.mktemp()
        with File(fname, 'w') as f:
            self.assertEqual(f.mode, 'r+')
        with File(fname, 'r') as f:
            self.assertEqual(f.mode, 'r')
            f2['External'] = h5py.ExternalLink(fname1, '/')
            f3 = f2['External'].file
            self.assertEqual(f3.mode, 'r+')
        finally:
            f2.close()

src/h/5/h5py-HEAD/h5py/tests/test_file.py   h5py(Download)
        with File(fname) as f:
            self.assertTrue(f)
            self.assertEqual(f.mode, 'r+')
 
        # Existing readonly file; open read-only
        os.chmod(fname, stat.S_IREAD)
        try:
            with File(fname) as f:
                self.assertTrue(f)
                self.assertEqual(f.mode, 'r')
    def test_mode_attr(self):
        """ Mode equivalent can be retrieved via property """
        fname = self.mktemp()
        with File(fname, 'w') as f:
            self.assertEqual(f.mode, 'r+')
        with File(fname, 'r') as f:
            self.assertEqual(f.mode, 'r')
            f2['External'] = h5py.ExternalLink(fname1, '/')
            f3 = f2['External'].file
            self.assertEqual(f3.mode, 'r+')
        finally:
            f2.close()

  1 | 2 | 3 | 4  Next