示例#1
0
 def test_age_on_neptune(self):
     age = SpaceAge(8210123456)
     self.assertEqual(age.on_earth(), 260.16)
     self.assertEqual(age.on_neptune(), 1.58)
示例#2
0
 def test_age_in_mercury_years(self):
     age = SpaceAge(2134835688)
     self.assertEqual(67.65, age.on_earth())
     print(type(age))
     self.assertEqual(280.88, age.on_mercury())
示例#3
0
 def test_age_on_mars(self):
     age = SpaceAge(2329871239)
     self.assertEqual(age.on_earth(), 73.83)
     self.assertEqual(age.on_mars(), 39.25)
示例#4
0
 def test_age_on_saturn(self):
     age = SpaceAge(3e9)
     self.assertEqual(age.on_earth(), 95.06)
     self.assertEqual(age.on_saturn(), 3.23)
示例#5
0
 def test_age_on_mercury(self):
     self.assertEqual(SpaceAge(2134835688).on_mercury(), 280.88)
示例#6
0
 def test_age_in_mercury_years(self):
     age = SpaceAge(2134835688)
     self.assertEqual(age.on_earth(), 67.65)
     self.assertEqual(age.on_mercury(), 280.88)
示例#7
0
 def test_age_on_neptune(self):
     self.assertEqual(SpaceAge(1821023456).on_neptune(), 0.35)
示例#8
0
 def test_age_on_neptune(self):
     age = SpaceAge(8210123456)
     self.assertEqual(260.16, age.on_earth())
     self.assertEqual(1.58, age.on_neptune())
示例#9
0
 def test_age_on_saturn(self):
     self.assertEqual(SpaceAge(2000000000).on_saturn(), 2.15)
示例#10
0
 def test_age_on_uranus(self):
     self.assertEqual(SpaceAge(1210123456).on_uranus(), 0.46)
示例#11
0
 def test_age_on_mars(self):
     self.assertEqual(SpaceAge(2129871239).on_mars(), 35.88)
示例#12
0
 def test_age_on_uranus(self):
     self.assertEqual(SpaceAge(3210123456).on_planet('   uRANUs'), 1.21)
示例#13
0
 def test_age_on_earth(self):
     self.assertEqual(SpaceAge(1000000000).on_planet('  EARTH'), 31.69)
示例#14
0
 def test_age_on_mars(self):
     age = SpaceAge(2329871239)
     self.assertEqual(73.83, age.on_earth())
     self.assertEqual(39.25, age.on_mars())
示例#15
0
 def test_age_in_venus_years(self):
     age = SpaceAge(189839836)
     self.assertEqual(6.02, age.on_earth())
     self.assertEqual(9.78, age.on_venus())
示例#16
0
 def test_age_on_saturn(self):
     age = SpaceAge(3e9)
     self.assertEqual(95.06, age.on_earth())
     self.assertEqual(3.23, age.on_saturn())
示例#17
0
 def test_age_on_mars(self):
     age = SpaceAge(2329871239)
     self.assertEqual(73.83, age.on_earth())
     self.assertEqual(39.25, age.on_mars())
示例#18
0
 def test_age_on_mercury(self):
     # pdb.set_trace()
     self.assertEqual(SpaceAge(2134835688).on_mercury(), 280.88)
示例#19
0
 def test_age_on_saturn(self):
     age = SpaceAge(3e9)
     self.assertEqual(95.06, age.on_earth())
     self.assertEqual(3.23, age.on_saturn())
示例#20
0
 def test_age_in_earth_years(self):
     age = SpaceAge(1e9)
     self.assertEqual(age.on_earth(), 31.69)
示例#21
0
 def test_age_on_venus(self):
     self.assertEqual(SpaceAge(189839836).on_venus(), 9.78)
示例#22
0
 def test_age_in_venus_years(self):
     age = SpaceAge(189839836)
     self.assertEqual(age.on_earth(), 6.02)
     self.assertEqual(age.on_venus(), 9.78)
示例#23
0
 def test_age_on_earth(self):
     self.assertEqual(SpaceAge(1000000000).on_earth(), 31.69)
示例#24
0
 def test_age_on_jupiter(self):
     age = SpaceAge(901876382)
     self.assertEqual(age.on_earth(), 28.58)
     self.assertEqual(age.on_jupiter(), 2.41)
示例#25
0
 def test_age_on_mars(self):
     self.assertEqual(SpaceAge(2329871239).on_mars(), 39.25)
示例#26
0
 def test_age_on_uranus(self):
     age = SpaceAge(3210123456)
     self.assertEqual(age.on_earth(), 101.72)
     self.assertEqual(age.on_uranus(), 1.21)
示例#27
0
 def test_age_on_jupiter(self):
     self.assertEqual(SpaceAge(901876382).on_jupiter(), 2.41)
示例#28
0
 def test_age_in_earth_years(self):
     age = SpaceAge(1e9)
     self.assertEqual(31.69, age.on_earth())
示例#29
0
 def test_age_on_saturn(self):
     self.assertEqual(SpaceAge(3000000000).on_saturn(), 3.23)
示例#30
0
 def test_age_in_venus_years(self):
     age = SpaceAge(189839836)
     self.assertEqual(6.02, age.on_earth())
     self.assertEqual(9.78, age.on_venus())
示例#31
0
 def test_age_on_uranus(self):
     self.assertEqual(SpaceAge(3210123456).on_uranus(), 1.21)
示例#32
0
 def test_age_on_jupiter(self):
     age = SpaceAge(901876382)
     self.assertEqual(28.58, age.on_earth())
     self.assertEqual(2.41, age.on_jupiter())
示例#33
0
 def test_age_on_neptune(self):
     self.assertEqual(SpaceAge(8210123456).on_neptune(), 1.58)
示例#34
0
 def test_age_on_uranus(self):
     age = SpaceAge(3210123456)
     self.assertEqual(101.72, age.on_earth())
     self.assertEqual(1.21, age.on_uranus())
示例#35
0
 def test_age_in_seconds(self):
     self.assertEqual(SpaceAge(1e6).seconds, 1e6)
示例#36
0
 def test_age_in_seconds(self):
     age = SpaceAge(1e6)
     self.assertEqual(1e6, age.seconds)
 def test_age_on_mercury(self):
     assert SpaceAge(2134835688).on_mercury() == 280.88