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

All Samples(5)  |  Call(4)  |  Derive(0)  |  Import(1)

src/o/p/open-exoplanet-catalogue-python-HEAD/oecpy/tests/test_astroclasses.py   open-exoplanet-catalogue-python(Download)
import quantities as pq
 
from ..astroclasses import Parameters, Star, Planet, Binary, System, _findNearest, SpectralType, _BaseObject
from ..example import genExamplePlanet
from .patches import TestCase
    def setUp(self):
        self.object1 = _BaseObject()
        self.object1.params = {'name': 'name1', 'radius': 10*pq.km, 'd': 1}
 
    def test_astroObject_same_object_is_eq(self):
        self.assertEqual(self.object1, self.object1)
 
    def test_astroObject_is_eq_same_param_dict(self):
        object2 = _BaseObject()
    def test_astroObject_is_neq_changed_param_dict(self):
        object2 = _BaseObject()
        object2.params = {'name': 'name1', 'radius': 10*pq.km, 'd': 2}
        self.assertNotEqual(self.object1, object2)
 
    def test_astroObject_is_eq_different_param_dict_same_values(self):
        object2 = _BaseObject()