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

All Samples(181)  |  Call(181)  |  Derive(0)  |  Import(0)

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_rig_size.py   Eos(Download)
        self.set_ship(ship_holder)
        restriction_error = self.get_restriction_error(holder, Restriction.rig_size)
        self.assertIsNotNone(restriction_error)
        self.assertEqual(restriction_error.allowed_size, 6)
        self.assertEqual(restriction_error.holder_size, 10)
        self.set_ship(ship_holder)
        restriction_error = self.get_restriction_error(holder, Restriction.rig_size)
        self.assertIsNotNone(restriction_error)
        self.assertEqual(restriction_error.allowed_size, 6)
        self.assertEqual(restriction_error.holder_size, 10)

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_capital_item.py   Eos(Download)
        self.track_holder(holder)
        restriction_error = self.get_restriction_error(holder, Restriction.capital_item)
        self.assertIsNotNone(restriction_error)
        self.assertEqual(restriction_error.max_allowed_volume, 500)
        self.assertEqual(restriction_error.holder_volume, 501)
        self.set_ship(ship_holder)
        restriction_error = self.get_restriction_error(holder, Restriction.capital_item)
        self.assertIsNotNone(restriction_error)
        self.assertEqual(restriction_error.max_allowed_volume, 500)
        self.assertEqual(restriction_error.holder_volume, 501)
        self.set_ship(ship_holder)
        restriction_error = self.get_restriction_error(holder, Restriction.capital_item)
        self.assertIsNotNone(restriction_error)
        self.assertEqual(restriction_error.max_allowed_volume, 500)
        self.assertEqual(restriction_error.holder_volume, 501)

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_skill_requirement.py   Eos(Download)
        self.track_holder(holder)
        restriction_error = self.get_restriction_error(holder, Restriction.skill_requirement)
        self.assertIsNotNone(restriction_error)
        self.assertCountEqual(restriction_error, ((50, None, 3),))
        self.untrack_holder(holder)
        self.fit.skills[50] = skill_holder
        restriction_error = self.get_restriction_error(holder, Restriction.skill_requirement)
        self.assertIsNotNone(restriction_error)
        self.assertCountEqual(restriction_error, ((50, 2, 5), (48, None, 1)))
        self.untrack_holder(holder)
        self.fit.skills[48] = skill_holder
        restriction_error = self.get_restriction_error(holder, Restriction.skill_requirement)
        self.assertIsNotNone(restriction_error)
        self.assertCountEqual(restriction_error, ((50, None, 5),))
        self.untrack_holder(holder)

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_charge_size.py   Eos(Download)
        self.assertIsNone(restriction_error1)
        restriction_error2 = self.get_restriction_error(charge_holder, Restriction.charge_size)
        self.assertIsNotNone(restriction_error2)
        self.assertEqual(restriction_error2.allowed_size, 3)
        self.assertEqual(restriction_error2.holder_size, 2)
        self.assertIsNone(restriction_error1)
        restriction_error2 = self.get_restriction_error(charge_holder, Restriction.charge_size)
        self.assertIsNotNone(restriction_error2)
        self.assertEqual(restriction_error2.allowed_size, 1)
        self.assertEqual(restriction_error2.holder_size, 2)
        self.assertIsNone(restriction_error1)
        restriction_error2 = self.get_restriction_error(charge_holder, Restriction.charge_size)
        self.assertIsNotNone(restriction_error2)
        self.assertEqual(restriction_error2.allowed_size, 3)
        self.assertEqual(restriction_error2.holder_size, None)

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_medium_slot.py   Eos(Download)
        self.fit.stats.med_slots.total = 0
        restriction_error = self.get_restriction_error(holder, Restriction.medium_slot)
        self.assertIsNotNone(restriction_error)
        self.assertEqual(restriction_error.slots_max_allowed, 0)
        self.assertEqual(restriction_error.slots_used, 1)
        self.fit.stats.med_slots.total = 0
        restriction_error = self.get_restriction_error(holder, Restriction.medium_slot)
        self.assertIsNotNone(restriction_error)
        self.assertEqual(restriction_error.slots_max_allowed, 0)
        self.assertEqual(restriction_error.slots_used, 1)
        self.fit.stats.med_slots.total = None
        restriction_error = self.get_restriction_error(holder, Restriction.medium_slot)
        self.assertIsNotNone(restriction_error)
        self.assertEqual(restriction_error.slots_max_allowed, 0)
        self.assertEqual(restriction_error.slots_used, 1)
        self.assertIsNone(restriction_error1)
        restriction_error2 = self.get_restriction_error(holder2, Restriction.medium_slot)
        self.assertIsNotNone(restriction_error2)
        self.assertEqual(restriction_error2.slots_max_allowed, 1)
        self.assertEqual(restriction_error2.slots_used, 2)
        self.assertIsNone(restriction_error1)
        restriction_error2 = self.get_restriction_error(holder2, Restriction.medium_slot)
        self.assertIsNotNone(restriction_error2)
        self.assertEqual(restriction_error2.slots_max_allowed, 3)
        self.assertEqual(restriction_error2.slots_used, 7)

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_low_slot.py   Eos(Download)
        self.fit.stats.low_slots.total = 0
        restriction_error = self.get_restriction_error(holder, Restriction.low_slot)
        self.assertIsNotNone(restriction_error)
        self.assertEqual(restriction_error.slots_max_allowed, 0)
        self.assertEqual(restriction_error.slots_used, 1)
        self.fit.stats.low_slots.total = 0
        restriction_error = self.get_restriction_error(holder, Restriction.low_slot)
        self.assertIsNotNone(restriction_error)
        self.assertEqual(restriction_error.slots_max_allowed, 0)
        self.assertEqual(restriction_error.slots_used, 1)
        self.fit.stats.low_slots.total = None
        restriction_error = self.get_restriction_error(holder, Restriction.low_slot)
        self.assertIsNotNone(restriction_error)
        self.assertEqual(restriction_error.slots_max_allowed, 0)
        self.assertEqual(restriction_error.slots_used, 1)
        self.assertIsNone(restriction_error1)
        restriction_error2 = self.get_restriction_error(holder2, Restriction.low_slot)
        self.assertIsNotNone(restriction_error2)
        self.assertEqual(restriction_error2.slots_max_allowed, 1)
        self.assertEqual(restriction_error2.slots_used, 2)
        self.assertIsNone(restriction_error1)
        restriction_error2 = self.get_restriction_error(holder2, Restriction.low_slot)
        self.assertIsNotNone(restriction_error2)
        self.assertEqual(restriction_error2.slots_max_allowed, 3)
        self.assertEqual(restriction_error2.slots_used, 7)

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_high_slot.py   Eos(Download)
        self.fit.stats.high_slots.total = 0
        restriction_error = self.get_restriction_error(holder, Restriction.high_slot)
        self.assertIsNotNone(restriction_error)
        self.assertEqual(restriction_error.slots_max_allowed, 0)
        self.assertEqual(restriction_error.slots_used, 1)
        self.fit.stats.high_slots.total = 0
        restriction_error = self.get_restriction_error(holder, Restriction.high_slot)
        self.assertIsNotNone(restriction_error)
        self.assertEqual(restriction_error.slots_max_allowed, 0)
        self.assertEqual(restriction_error.slots_used, 1)
        self.fit.stats.high_slots.total = None
        restriction_error = self.get_restriction_error(holder, Restriction.high_slot)
        self.assertIsNotNone(restriction_error)
        self.assertEqual(restriction_error.slots_max_allowed, 0)
        self.assertEqual(restriction_error.slots_used, 1)
        self.assertIsNone(restriction_error1)
        restriction_error2 = self.get_restriction_error(holder2, Restriction.high_slot)
        self.assertIsNotNone(restriction_error2)
        self.assertEqual(restriction_error2.slots_max_allowed, 1)
        self.assertEqual(restriction_error2.slots_used, 2)
        self.assertIsNone(restriction_error1)
        restriction_error2 = self.get_restriction_error(holder2, Restriction.high_slot)
        self.assertIsNotNone(restriction_error2)
        self.assertEqual(restriction_error2.slots_max_allowed, 3)
        self.assertEqual(restriction_error2.slots_used, 7)

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_charge_volume.py   Eos(Download)
        self.assertIsNone(restriction_error1)
        restriction_error2 = self.get_restriction_error(charge_holder, Restriction.charge_volume)
        self.assertIsNotNone(restriction_error2)
        self.assertEqual(restriction_error2.max_allowed_volume, 1)
        self.assertEqual(restriction_error2.holder_volume, 2)
        self.assertIsNone(restriction_error1)
        restriction_error2 = self.get_restriction_error(charge_holder, Restriction.charge_volume)
        self.assertIsNotNone(restriction_error2)
        self.assertEqual(restriction_error2.max_allowed_volume, 0)
        self.assertEqual(restriction_error2.holder_volume, 2)

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_state.py   Eos(Download)
        self.track_holder(holder)
        restriction_error = self.get_restriction_error(holder, Restriction.state)
        self.assertIsNotNone(restriction_error)
        self.assertEqual(restriction_error.current_state, State.overload)
        self.assertCountEqual(restriction_error.allowed_states, (State.offline, State.online, State.active))

Previous  1 | 2 | 3