Guest User

Untitled

a guest
Aug 15th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. from eos import db
  2. from eos.tests import TestBase
  3. from eos.types import Fit, Character, Ship, Module, State
  4.  
  5. class Test(TestBase):
  6. def test_scanResolution_ship(self):
  7. iIngame = 1.0
  8. fIngame = 1.6
  9. fit = Fit()
  10. char = Character("test")
  11. fit.character = char
  12. fit.ship = Ship(db.getItem("Rifter"))
  13. fit.calculateModifiedAttributes()
  14. iEos = fit.ship.getModifiedItemAttr("scanResolution")
  15. mod = Module(db.getItem("Sensor Booster II"))
  16. mod.charge = db.getItem("Scan Resolution")
  17. mod.state = State.ACTIVE
  18. fit.modules.append(mod)
  19. fit.calculateModifiedAttributes()
  20. fEos = fit.ship.getModifiedItemAttr("scanResolution")
  21. dIngame = fIngame / iIngame
  22. dEos = fEos / iEos
  23. self.assertAlmostEquals(dEos, dIngame)
Add Comment
Please, Sign In to add comment