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

All Samples(34)  |  Call(26)  |  Derive(1)  |  Import(7)

src/e/o/Eos-HEAD/fit/holder/mixin/chargeable.py   Eos(Download)
from eos.const.eve import Attribute, Effect
from eos.fit.holder.container import HolderDescriptorOnHolder
from eos.fit.holder.item import Charge
from eos.util.override import OverrideDescriptor
from eos.util.volatile_cache import CooperativeVolatileMixin, VolatileProperty

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
 
        self.holder.item.attributes = {}
        self.holder.attributes = {}
        self.charge = Charge(type_id=None)
        self.charge.item = Mock()
        self.charge.item.attributes = {}

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_charge_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, Charge
from eos.tests.restriction_tracker.restriction_testcase import RestrictionTestCase
 
    def test_fail_group1(self):
        charge_item = self.ch.type_(type_id=1, group_id=1008)
        charge_holder = Mock(state=State.offline, item=charge_item, _location=None, spec_set=Charge(1))
        container_item = self.ch.type_(type_id=2, attributes={Attribute.charge_group_1: 3})
        container_holder = Mock(state=State.offline, item=container_item,
    def test_fail_group2(self):
        charge_item = self.ch.type_(type_id=1, group_id=1008)
        charge_holder = Mock(state=State.offline, item=charge_item, _location=None, spec_set=Charge(1))
        container_item = self.ch.type_(type_id=2, attributes={Attribute.charge_group_2: 3})
        container_holder = Mock(state=State.offline, item=container_item,
    def test_fail_group3(self):
        charge_item = self.ch.type_(type_id=1, group_id=1008)
        charge_holder = Mock(state=State.offline, item=charge_item, _location=None, spec_set=Charge(1))
        container_item = self.ch.type_(type_id=2, attributes={Attribute.charge_group_3: 3})
        container_holder = Mock(state=State.offline, item=container_item,
    def test_fail_group4(self):
        charge_item = self.ch.type_(type_id=1, group_id=1008)
        charge_holder = Mock(state=State.offline, item=charge_item, _location=None, spec_set=Charge(1))
        container_item = self.ch.type_(type_id=2, attributes={Attribute.charge_group_4: 3})
        container_holder = Mock(state=State.offline, item=container_item,

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_charge_volume.py   Eos(Download)
from eos.const.eos import Location, Restriction, State
from eos.const.eve import Attribute
from eos.fit.holder.item import ModuleHigh, Charge
from eos.tests.restriction_tracker.restriction_testcase import RestrictionTestCase
 
    def test_fail_greater(self):
        charge_item = self.ch.type_(type_id=1, attributes={Attribute.volume: 2})
        charge_holder = Mock(state=State.offline, item=charge_item, _location=None, spec_set=Charge(1))
        container_item = self.ch.type_(type_id=2, attributes={Attribute.capacity: 1})
        container_holder = Mock(state=State.offline, item=container_item,
    def test_pass_no_capacity(self):
        charge_item = self.ch.type_(type_id=1, attributes={Attribute.volume: 2})
        charge_holder = Mock(state=State.offline, item=charge_item, _location=None, spec_set=Charge(1))
        container_item = self.ch.type_(type_id=2, attributes={})
        container_holder = Mock(state=State.offline, item=container_item,
    def test_pass_no_volume(self):
        charge_item = self.ch.type_(type_id=1, attributes={})
        charge_holder = Mock(state=State.offline, item=charge_item, _location=None, spec_set=Charge(1))
        container_item = self.ch.type_(type_id=2, attributes={Attribute.volume: 3})
        container_holder = Mock(state=State.offline, item=container_item,
    def test_pass_equal(self):
        charge_item = self.ch.type_(type_id=1, attributes={Attribute.capacity: 2})
        charge_holder = Mock(state=State.offline, item=charge_item, _location=None, spec_set=Charge(1))
        container_item = self.ch.type_(type_id=2, attributes={Attribute.volume: 2})
        container_holder = Mock(state=State.offline, item=container_item,

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_charge_size.py   Eos(Download)
from eos.const.eos import Location, Restriction, State
from eos.const.eve import Attribute
from eos.fit.holder.item import ModuleHigh, Charge
from eos.tests.restriction_tracker.restriction_testcase import RestrictionTestCase
 
    def test_fail_lesser(self):
        charge_item = self.ch.type_(type_id=1, attributes={Attribute.charge_size: 2})
        charge_holder = Mock(state=State.offline, item=charge_item, _location=None, spec_set=Charge(1))
        container_item = self.ch.type_(type_id=2, attributes={Attribute.charge_size: 3})
        container_holder = Mock(state=State.offline, item=container_item,
    def test_fail_greater(self):
        charge_item = self.ch.type_(type_id=1, attributes={Attribute.charge_size: 2})
        charge_holder = Mock(state=State.offline, item=charge_item, _location=None, spec_set=Charge(1))
        container_item = self.ch.type_(type_id=2, attributes={Attribute.charge_size: 1})
        container_holder = Mock(state=State.offline, item=container_item,
    def test_fail_charge_no_attrib(self):
        charge_item = self.ch.type_(type_id=1, attributes={})
        charge_holder = Mock(state=State.offline, item=charge_item, _location=None, spec_set=Charge(1))
        container_item = self.ch.type_(type_id=2, attributes={Attribute.charge_size: 3})
        container_holder = Mock(state=State.offline, item=container_item,
    def test_pass_equal(self):
        charge_item = self.ch.type_(type_id=1, attributes={Attribute.charge_size: 2})
        charge_holder = Mock(state=State.offline, item=charge_item, _location=None, spec_set=Charge(1))
        container_item = self.ch.type_(type_id=2, attributes={Attribute.charge_size: 2})
        container_holder = Mock(state=State.offline, item=container_item,

src/e/o/Eos-HEAD/tests/fit/environment.py   Eos(Download)
 
from eos.const.eos import State
from eos.fit.holder.item import Charge, ModuleHigh
from eos.fit.holder.mixin.state import MutableStateMixin
from eos.util.volatile_cache import InheritableVolatileMixin
class CachingCharge(Charge, InheritableVolatileMixin):
 
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self._clear_volatile_attrs = Mock()