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

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

src/e/o/Eos-HEAD/tests/fit/holder_container/module_charge/test_module_charge.py   Eos(Download)
        if self.expect_module_charge_link is True:
            if hasattr(holder, 'charge'):
                self.assertIn(holder, fit.ordered)
                charge = holder.charge
                self.assertIsNotNone(charge)
                self.assertIs(container.charge, holder)
        elif self.expect_module_charge_link is False:
            self.assertIn(holder, fit.ordered)
            if hasattr(holder, 'charge'):
                self.assertIsNone(holder.charge)
        # Checks
        self.assertEqual(len(fit.lt), 1)
        self.assertIn(module, fit.lt)
        self.assertEqual(fit.lt[module], {State.offline, State.online, State.active})
        self.assertEqual(len(fit.rt), 1)
        self.assertIn(module, fit.rt)
        self.assertEqual(fit.rt[module], {State.offline, State.online, State.active})
        self.assertEqual(len(fit.st), 1)
        self.assertIn(module, fit.st)

src/e/o/Eos-HEAD/tests/fit/holder_container/ordered/test_insert.py   Eos(Download)
    def custom_membership_check(self, fit, holder):
        self.assertIn(holder, fit.container)
 
    def test_detached_holder_to_zero(self):
        fit = self.make_fit()
        # Checks
        self.assertEqual(len(fit.lt), 3)
        self.assertIn(holder1, fit.lt)
        self.assertEqual(fit.lt[holder1], {State.offline, State.online, State.active})
        self.assertIn(holder2, fit.lt)
        self.assertEqual(fit.lt[holder2], {State.offline, State.online})
        self.assertIn(holder3, fit.lt)
        self.assertEqual(fit.lt[holder3], {State.offline, State.online, State.active})
        self.assertEqual(len(fit.rt), 3)
        self.assertIn(holder1, fit.rt)

src/e/o/Eos-HEAD/tests/fit/holder_container/ordered/test_place.py   Eos(Download)
    def custom_membership_check(self, fit, holder):
        self.assertIn(holder, fit.container)
 
    def test_detached_holder_outside(self):
        fit = self.make_fit()
        # Checks
        self.assertEqual(len(fit.lt), 2)
        self.assertIn(holder1, fit.lt)
        self.assertEqual(fit.lt[holder1], {State.offline, State.online, State.active, State.overload})
        self.assertIn(holder2, fit.lt)
        self.assertEqual(fit.lt[holder2], {State.offline})
        self.assertEqual(len(fit.rt), 2)
        self.assertIn(holder1, fit.rt)
        self.assertEqual(fit.rt[holder1], {State.offline, State.online, State.active, State.overload})
        self.assertIn(holder2, fit.rt)

src/e/o/Eos-HEAD/tests/fit/holder_container/unordered/test_restricted_set.py   Eos(Download)
    def custom_membership_check(self, fit, holder):
        self.assertIn(holder, fit.container)
 
    def test_detached_add_none(self):
        fit = self.make_fit()
        self.assertEqual(len(fit.container), 1)
        self.assertIs(fit.container[1], holder)
        self.assertIn(holder, fit.container)
        self.assertIs(holder._fit, fit)
        st_cleans_after = len(fit.stats._clear_volatile_attrs.mock_calls)
        self.assertEqual(len(fit_other.container), 1)
        self.assertIs(fit_other.container[1], holder)
        self.assertIn(holder, fit_other.container)
        self.assertIs(holder._fit, fit_other)
        st_cleans_after = len(fit.stats._clear_volatile_attrs.mock_calls)
        self.assertEqual(len(fit.container), 1)
        self.assertIs(fit.container[1], holder1)
        self.assertIn(holder1, fit.container)
        self.assertIs(holder1._fit, fit)
        self.assertIsNone(holder2._fit)
        # Checks
        self.assertEqual(len(fit.lt), 1)
        self.assertIn(holder, fit.lt)
        self.assertEqual(fit.lt[holder], {State.offline, State.online})
        self.assertEqual(len(fit.rt), 1)

src/e/o/Eos-HEAD/tests/fit/holder_container/ordered/test_remove.py   Eos(Download)
    def custom_membership_check(self, fit, holder):
        self.assertIn(holder, fit.container)
 
    def test_detached_holder(self):
        fit = self.make_fit()
        # Checks
        self.assertEqual(len(fit.lt), 1)
        self.assertIn(holder2, fit.lt)
        self.assertEqual(fit.lt[holder2], {State.offline, State.online, State.active, State.overload})
        self.assertEqual(len(fit.rt), 1)
        self.assertIn(holder2, fit.rt)
        self.assertEqual(fit.rt[holder2], {State.offline, State.online, State.active, State.overload})
        self.assertEqual(len(fit.st), 1)
        self.assertIn(holder2, fit.st)
        # Checks
        self.assertEqual(len(fit.lt), 2)
        self.assertIn(holder1, fit.lt)
        self.assertEqual(fit.lt[holder1], {State.offline, State.online, State.active})
        self.assertIn(holder3, fit.lt)

src/e/o/Eos-HEAD/tests/fit/holder_container/ordered/test_free.py   Eos(Download)
    def custom_membership_check(self, fit, holder):
        self.assertIn(holder, fit.container)
 
    def test_detached_none(self):
        fit = self.make_fit()
        # Checks
        self.assertEqual(len(fit.lt), 2)
        self.assertIn(holder1, fit.lt)
        self.assertEqual(fit.lt[holder1], {State.offline, State.online, State.active, State.overload})
        self.assertIn(holder2, fit.lt)
        self.assertEqual(fit.lt[holder2], {State.offline, State.online, State.active})
        self.assertEqual(len(fit.rt), 2)
        self.assertIn(holder1, fit.rt)
        self.assertEqual(fit.rt[holder1], {State.offline, State.online, State.active, State.overload})
        self.assertIn(holder2, fit.rt)

src/e/o/Eos-HEAD/tests/fit/holder_container/direct/test_ship.py   Eos(Download)
        # Checks
        self.assertEqual(len(fit.lt), 1)
        self.assertIn(holder, fit.lt)
        self.assertEqual(fit.lt[holder], {State.offline, State.online})
        self.assertEqual(len(fit.rt), 1)
        self.assertIn(holder, fit.rt)
        self.assertEqual(fit.rt[holder], {State.offline, State.online})
        self.assertEqual(len(fit.st), 1)
        self.assertIn(holder, fit.st)
        self.assertEqual(len(fit.st), 0)
        self.assertEqual(len(fit_other.lt), 1)
        self.assertIn(holder, fit_other.lt)
        self.assertEqual(fit_other.lt[holder], {State.offline})
        self.assertEqual(len(fit_other.rt), 1)
        self.assertIn(holder, fit_other.rt)

src/e/o/Eos-HEAD/tests/fit/holder_container/unordered/test_set.py   Eos(Download)
    def custom_membership_check(self, fit, holder):
        self.assertIn(holder, fit.container)
 
    def test_detached_add_none(self):
        fit = self.make_fit()
        self.assertEqual(len(fit.st), 0)
        self.assertEqual(len(fit.container), 1)
        self.assertIn(holder, fit.container)
        self.assertIs(holder._fit, fit)
        st_cleans_after = len(fit.stats._clear_volatile_attrs.mock_calls)
        self.assertEqual(len(fit_other.st), 0)
        self.assertEqual(len(fit_other.container), 1)
        self.assertIn(holder, fit_other.container)
        self.assertIs(holder._fit, fit_other)
        st_cleans_after = len(fit.stats._clear_volatile_attrs.mock_calls)
        # Checks
        self.assertEqual(len(fit.lt), 1)
        self.assertIn(holder, fit.lt)
        self.assertEqual(fit.lt[holder], {State.offline, State.online})
        self.assertEqual(len(fit.rt), 1)
        self.assertIn(holder, fit.rt)

src/e/o/Eos-HEAD/tests/fit/holder_container/ordered/test_append.py   Eos(Download)
    def custom_membership_check(self, fit, holder):
        self.assertIn(holder, fit.container)
 
    def test_detached_none(self):
        fit = self.make_fit()
        # Checks
        self.assertEqual(len(fit.lt), 1)
        self.assertIn(holder1, fit.lt)
        self.assertEqual(fit.lt[holder1], {State.offline, State.online})
        self.assertEqual(len(fit.rt), 1)
        self.assertIn(holder1, fit.rt)
        self.assertEqual(fit.rt[holder1], {State.offline, State.online})
        self.assertEqual(len(fit.st), 1)
        self.assertIn(holder1, fit.st)
        # Checks
        self.assertEqual(len(fit.lt), 2)
        self.assertIn(holder1, fit.lt)
        self.assertEqual(fit.lt[holder1], {State.offline, State.online})
        self.assertIn(holder2, fit.lt)

src/e/o/Eos-HEAD/tests/fit/holder_container/ordered/test_equip.py   Eos(Download)
    def custom_membership_check(self, fit, holder):
        self.assertIn(holder, fit.container)
 
    def test_detached_none_to_empty(self):
        fit = self.make_fit()
        # Checks
        self.assertEqual(len(fit.lt), 1)
        self.assertIn(holder, fit.lt)
        self.assertEqual(fit.lt[holder], {State.offline, State.online, State.active, State.overload})
        self.assertEqual(len(fit.rt), 1)
        self.assertIn(holder, fit.rt)
        self.assertEqual(fit.rt[holder], {State.offline, State.online, State.active, State.overload})
        self.assertEqual(len(fit.st), 1)
        self.assertIn(holder, fit.st)
        self.assertIs(len(fit.container), 0)
        self.assertEqual(len(fit_other.lt), 1)
        self.assertIn(holder, fit_other.lt)
        self.assertEqual(fit_other.lt[holder], {State.offline})
        self.assertEqual(len(fit_other.rt), 1)

  1 | 2  Next