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

All Samples(365)  |  Call(328)  |  Derive(1)  |  Import(36)

src/e/o/Eos-HEAD/tests/fit/holder_mixin/chargeable/test_quantity.py   Eos(Download)
from eos.const.eve import Attribute
from eos.fit.holder.container import HolderSet
from eos.fit.holder.item import ModuleHigh, Charge
from eos.tests.fit.fit_testcase import FitTestCase
 
    def setUp(self):
        FitTestCase.setUp(self)
        self.holder = ModuleHigh(type_id=None)
        self.holder.attributes = {}
        self.charge = Charge(type_id=None)

src/e/o/Eos-HEAD/tests/fit/holder_mixin/chargeable/test_charged_cycles.py   Eos(Download)
from eos.const.eve import Attribute, Effect
from eos.fit.holder.container import HolderSet
from eos.fit.holder.item import ModuleHigh, Charge
from eos.tests.fit.fit_testcase import FitTestCase
 
    def setUp(self):
        FitTestCase.setUp(self)
        self.holder = ModuleHigh(type_id=None)
        self.holder.item = Mock()
        self.holder.item.attributes = {}

src/e/o/Eos-HEAD/tests/fit/holder_mixin/chargeable/test_reload_time.py   Eos(Download)
 
from eos.const.eve import Attribute, Effect
from eos.fit.holder.item import ModuleHigh
from eos.tests.fit.fit_testcase import FitTestCase
 
    def setUp(self):
        FitTestCase.setUp(self)
        self.holder = ModuleHigh(type_id=None)
        self.holder.item = Mock()
        self.holder._clear_volatile_attrs = Mock()

src/e/o/Eos-HEAD/tests/stat_tracker/resource/test_powergrid.py   Eos(Download)
from eos.const.eos import Location, State
from eos.const.eve import Attribute
from eos.fit.holder.item import ModuleHigh, Ship, Implant
from eos.tests.stat_tracker.stat_testcase import StatTestCase
 
    def test_use_single_rounding_up(self):
        item = self.ch.type_(type_id=1, attributes={Attribute.power: 0})
        holder = Mock(state=State.online, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        holder.attributes = {Attribute.power: 55.5555555555}
        self.track_holder(holder)
    def test_use_single_rounding_down(self):
        item = self.ch.type_(type_id=1, attributes={Attribute.power: 0})
        holder = Mock(state=State.online, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        holder.attributes = {Attribute.power: 44.4444444444}
        self.track_holder(holder)
    def test_use_multiple(self):
        item = self.ch.type_(type_id=1, attributes={Attribute.power: 0})
        holder1 = Mock(state=State.online, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        holder1.attributes = {Attribute.power: 50}
        self.track_holder(holder1)
        holder2 = Mock(state=State.online, item=item, _location=Location.ship, spec_set=ModuleHigh(1))

src/e/o/Eos-HEAD/tests/stat_tracker/resource/test_cpu.py   Eos(Download)
from eos.const.eos import Location, State
from eos.const.eve import Attribute
from eos.fit.holder.item import ModuleHigh, Ship, Implant
from eos.tests.stat_tracker.stat_testcase import StatTestCase
 
    def test_use_single_rounding_up(self):
        item = self.ch.type_(type_id=1, attributes={Attribute.cpu: 0})
        holder = Mock(state=State.online, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        holder.attributes = {Attribute.cpu: 55.5555555555}
        self.track_holder(holder)
    def test_use_single_rounding_down(self):
        item = self.ch.type_(type_id=1, attributes={Attribute.cpu: 0})
        holder = Mock(state=State.online, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        holder.attributes = {Attribute.cpu: 44.4444444444}
        self.track_holder(holder)
    def test_use_multiple(self):
        item = self.ch.type_(type_id=1, attributes={Attribute.cpu: 0})
        holder1 = Mock(state=State.online, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        holder1.attributes = {Attribute.cpu: 50}
        self.track_holder(holder1)
        holder2 = Mock(state=State.online, item=item, _location=Location.ship, spec_set=ModuleHigh(1))

src/e/o/Eos-HEAD/tests/stat_tracker/resource/test_calibration.py   Eos(Download)
from unittest.mock import Mock
 
from eos.const.eos import Location, State
from eos.const.eve import Attribute
from eos.fit.holder.item import ModuleHigh, Ship, Implant
    def test_use_single_no_rounding(self):
        item = self.ch.type_(type_id=1, attributes={Attribute.upgrade_cost: 0})
        holder = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        holder.attributes = {Attribute.upgrade_cost: 55.5555555555}
        self.track_holder(holder)
    def test_use_multiple(self):
        item = self.ch.type_(type_id=1, attributes={Attribute.upgrade_cost: 0})
        holder1 = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        holder1.attributes = {Attribute.upgrade_cost: 50}
        self.track_holder(holder1)
        holder2 = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
    def test_use_negative(self):
        item = self.ch.type_(type_id=1, attributes={Attribute.upgrade_cost: 0})
        holder1 = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        holder1.attributes = {Attribute.upgrade_cost: 50}
        self.track_holder(holder1)

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_ship_type_group.py   Eos(Download)
from eos.const.eos import Location, Restriction, State
from eos.const.eve import Attribute
from eos.fit.holder.item import ModuleHigh, Ship
from eos.tests.restriction_tracker.restriction_testcase import RestrictionTestCase
 
        self.set_ship(ship_holder)
        item = self.ch.type_(type_id=1, attributes={Attribute.can_fit_ship_type_1: 10})
        holder = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder)
        restriction_error = self.get_restriction_error(holder, Restriction.ship_type_group)
        self.set_ship(ship_holder)
        item = self.ch.type_(type_id=1, attributes={Attribute.can_fit_ship_type_2: 10})
        holder = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder)
        restriction_error = self.get_restriction_error(holder, Restriction.ship_type_group)
        self.set_ship(ship_holder)
        item = self.ch.type_(type_id=1, attributes={Attribute.can_fit_ship_type_3: 10})
        holder = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder)
        restriction_error = self.get_restriction_error(holder, Restriction.ship_type_group)
        self.set_ship(ship_holder)
        item = self.ch.type_(type_id=1, attributes={Attribute.can_fit_ship_type_4: 10})
        holder = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder)
        restriction_error = self.get_restriction_error(holder, Restriction.ship_type_group)

src/e/o/Eos-HEAD/tests/stat_tracker/slot/test_turret.py   Eos(Download)
from eos.const.eos import Location, Slot, State
from eos.const.eve import Attribute
from eos.fit.holder.item import ModuleHigh, Ship
from eos.tests.stat_tracker.stat_testcase import StatTestCase
 
    def test_use_single(self):
        item = self.ch.type_(type_id=1, attributes={})
        item.slots = {Slot.turret}
        holder = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder)
    def test_use_other_slot(self):
        item = self.ch.type_(type_id=1, attributes={})
        item.slots = {Slot.launcher}
        holder = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder)
    def test_use_multiple(self):
        item = self.ch.type_(type_id=1, attributes={})
        item.slots = {Slot.turret}
        holder1 = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        holder2 = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))

src/e/o/Eos-HEAD/tests/stat_tracker/slot/test_launcher.py   Eos(Download)
from eos.const.eos import Location, Slot, State
from eos.const.eve import Attribute
from eos.fit.holder.item import ModuleHigh, Ship
from eos.tests.stat_tracker.stat_testcase import StatTestCase
 
    def test_use_single(self):
        item = self.ch.type_(type_id=1, attributes={})
        item.slots = {Slot.launcher}
        holder = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder)
    def test_use_other_slot(self):
        item = self.ch.type_(type_id=1, attributes={})
        item.slots = {Slot.turret}
        holder = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder)
    def test_use_multiple(self):
        item = self.ch.type_(type_id=1, attributes={})
        item.slots = {Slot.launcher}
        holder1 = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        holder2 = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))

src/e/o/Eos-HEAD/tests/stat_tracker/slot/test_med.py   Eos(Download)
from eos.const.eos import Location, State
from eos.const.eve import Attribute
from eos.fit.holder.item import ModuleHigh, Ship
from eos.tests.stat_tracker.stat_testcase import StatTestCase
 
    def test_use_multiple(self):
        item = self.ch.type_(type_id=1, attributes={})
        holder1 = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        holder2 = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        self.fit.modules.med.append(holder1)
    def test_use_multiple_with_none(self):
        item = self.ch.type_(type_id=1, attributes={})
        holder1 = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        holder2 = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        self.fit.modules.med.append(None)

  1 | 2 | 3 | 4  Next