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

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

src/e/o/Eos-HEAD/tests/fit/holder_container/module_charge/test_module_charge.py   Eos(Download)
            self.assertIn(holder, fit.ordered)
            if hasattr(holder, 'charge'):
                self.assertIsNone(holder.charge)
            if hasattr(holder, 'container'):
                self.assertIsNone(holder.container)
        module.charge = None
        # Checks
        self.assertIsNone(module.charge)
        self.assertIsNone(module._fit)
        module_cleans_after = len(module._clear_volatile_attrs.mock_calls)
        self.assertIs(module.charge, charge)
        self.assertIs(charge.container, module)
        self.assertIsNone(module._fit)
        self.assertIsNone(charge._fit)
        module_cleans_after = len(module._clear_volatile_attrs.mock_calls)

src/e/o/Eos-HEAD/tests/fit/holder_container/ordered/test_free.py   Eos(Download)
        self.assertEqual(len(fit.st), 0)
        self.assertIs(len(fit.container), 2)
        self.assertIsNone(fit.container[0])
        self.assertIs(fit.container[1], holder2)
        self.assertIsNone(holder1._fit)
        self.assertEqual(len(fit.st), 0)
        self.assertIs(len(fit.container), 2)
        self.assertIsNone(fit.container[0])
        self.assertIs(fit.container[1], holder2)
        self.assertIsNone(holder1._fit)
        self.assertEqual(len(fit.st), 0)
        self.assertIs(len(fit.container), 0)
        self.assertIsNone(holder1._fit)
        self.assertIsNone(holder2._fit)
        st_cleans_after = len(fit.stats._clear_volatile_attrs.mock_calls)

src/e/o/Eos-HEAD/tests/fit/holder_container/ordered/test_remove.py   Eos(Download)
        self.assertIs(len(fit.container), 1)
        self.assertIs(fit.container[0], holder2)
        self.assertIsNone(holder1._fit)
        self.assertIs(holder2._fit, fit)
        st_cleans_between = len(fit.stats._clear_volatile_attrs.mock_calls)
        self.assertEqual(len(fit.st), 0)
        self.assertIs(len(fit.container), 0)
        self.assertIsNone(holder1._fit)
        self.assertIsNone(holder2._fit)
        st_cleans_after = len(fit.stats._clear_volatile_attrs.mock_calls)
        self.assertIs(len(fit.container), 6)
        self.assertIs(fit.container[0], holder1)
        self.assertIsNone(fit.container[1])
        self.assertIsNone(fit.container[2])
        self.assertIsNone(fit.container[3])

src/e/o/Eos-HEAD/tests/fit/holder_container/unordered/test_restricted_set.py   Eos(Download)
        self.assertEqual(len(fit.st), 0)
        self.assertEqual(len(fit.container), 0)
        self.assertIsNone(holder._fit)
        st_cleans_after = len(fit.stats._clear_volatile_attrs.mock_calls)
        holder_cleans_after = len(holder._clear_volatile_attrs.mock_calls)
        self.assertIn(holder1, fit.container)
        self.assertIs(holder1._fit, fit)
        self.assertIsNone(holder2._fit)
        st_cleans_after = len(fit.stats._clear_volatile_attrs.mock_calls)
        holder1_cleans_after = len(holder1._clear_volatile_attrs.mock_calls)
        self.assertEqual(len(fit.st), 0)
        self.assertEqual(len(fit.container), 0)
        self.assertIsNone(holder._fit)
        st_cleans_after = len(fit.stats._clear_volatile_attrs.mock_calls)
        holder_cleans_after = len(holder._clear_volatile_attrs.mock_calls)
        self.assertEqual(len(fit.st), 0)
        self.assertEqual(len(fit.container), 0)
        self.assertIsNone(holder._fit)
        st_cleans_after = len(fit.stats._clear_volatile_attrs.mock_calls)
        holder_cleans_after = len(holder._clear_volatile_attrs.mock_calls)
        self.assertEqual(len(fit.st), 0)
        self.assertEqual(len(fit.container), 0)
        self.assertIsNone(holder._fit)
        st_cleans_after = len(fit.stats._clear_volatile_attrs.mock_calls)
        holder_cleans_after = len(holder._clear_volatile_attrs.mock_calls)

src/e/o/Eos-HEAD/tests/fit/holder_container/ordered/test_misc.py   Eos(Download)
        self.assertEqual(len(fit.st), 0)
        self.assertIs(len(fit.container), 0)
        self.assertIsNone(holder1._fit)
        self.assertIsNone(holder2._fit)
        st_cleans_after = len(fit.stats._clear_volatile_attrs.mock_calls)
        self.assertEqual(len(fit.st), 0)
        self.assertIs(len(fit.container), 0)
        self.assertIsNone(holder1._fit)
        self.assertIsNone(holder2._fit)
        st_cleans_after = len(fit.stats._clear_volatile_attrs.mock_calls)
        self.assertEqual(len(slice_full), 4)
        self.assertIs(slice_full[0], holder1)
        self.assertIsNone(slice_full[1])
        self.assertIsNone(slice_full[2])
        self.assertIs(slice_full[3], holder2)

src/e/o/Eos-HEAD/tests/fit/holder_container/ordered/test_place.py   Eos(Download)
        self.assertIs(len(fit.container), 4)
        self.assertIs(fit.container[0], holder1)
        self.assertIsNone(fit.container[1])
        self.assertIsNone(fit.container[2])
        self.assertIs(fit.container[3], holder2)
        self.assertIs(fit.container[0], holder1)
        self.assertIs(fit.container[1], holder3)
        self.assertIsNone(fit.container[2])
        self.assertIs(fit.container[3], holder2)
        self.assertIs(holder1._fit, fit)
        self.assertIs(len(fit.container), 4)
        self.assertIs(fit.container[0], holder1)
        self.assertIsNone(fit.container[1])
        self.assertIsNone(fit.container[2])
        self.assertIs(fit.container[3], holder2)

src/e/o/Eos-HEAD/tests/fit/holder_container/direct/test_ship.py   Eos(Download)
        self.assertEqual(len(fit.rt), 0)
        self.assertEqual(len(fit.st), 0)
        self.assertIsNone(fit.ship)
        st_cleans_after = len(fit.stats._clear_volatile_attrs.mock_calls)
        self.assertEqual(st_cleans_after - st_cleans_before, 0)
        self.assertEqual(len(fit.rt), 0)
        self.assertEqual(len(fit.st), 0)
        self.assertIsNone(fit.ship)
        self.assertIsNone(holder._fit)
        st_cleans_after = len(fit.stats._clear_volatile_attrs.mock_calls)
        self.assertEqual(len(fit_other.rt), 0)
        self.assertEqual(len(fit_other.st), 0)
        self.assertIsNone(fit.ship)
        self.assertIs(fit_other.ship, holder)
        self.assertIs(holder._fit, fit_other)
        self.assertEqual(len(fit.st), 0)
        self.assertIs(fit.ship, holder2)
        self.assertIsNone(holder1._fit)
        self.assertIs(holder2._fit, fit)
        st_cleans_after = len(fit.stats._clear_volatile_attrs.mock_calls)

src/e/o/Eos-HEAD/tests/fit/holder_container/unordered/test_set.py   Eos(Download)
        self.assertEqual(len(fit.st), 0)
        self.assertEqual(len(fit.container), 0)
        self.assertIsNone(holder._fit)
        st_cleans_after = len(fit.stats._clear_volatile_attrs.mock_calls)
        holder_cleans_after = len(holder._clear_volatile_attrs.mock_calls)
        self.assertEqual(len(fit.st), 0)
        self.assertEqual(len(fit.container), 0)
        self.assertIsNone(holder._fit)
        st_cleans_after = len(fit.stats._clear_volatile_attrs.mock_calls)
        holder_cleans_after = len(holder._clear_volatile_attrs.mock_calls)
        self.assertEqual(len(fit.st), 0)
        self.assertEqual(len(fit.container), 0)
        self.assertIsNone(holder._fit)
        st_cleans_after = len(fit.stats._clear_volatile_attrs.mock_calls)
        holder_cleans_after = len(holder._clear_volatile_attrs.mock_calls)
        self.assertEqual(len(fit.st), 0)
        self.assertEqual(len(fit.container), 0)
        self.assertIsNone(holder1._fit)
        self.assertIsNone(holder2._fit)
        st_cleans_after = len(fit.stats._clear_volatile_attrs.mock_calls)

src/e/o/Eos-HEAD/tests/fit/holder_container/ordered/test_insert.py   Eos(Download)
        self.assertIs(len(fit.container), 4)
        self.assertIs(fit.container[0], holder1)
        self.assertIsNone(fit.container[1])
        self.assertIsNone(fit.container[2])
        self.assertIs(fit.container[3], holder2)
        self.assertIs(holder1._fit, fit)
        self.assertIs(holder2._fit, fit)
        self.assertIsNone(holder3._fit)
        st_cleans_after = len(fit.stats._clear_volatile_attrs.mock_calls)
        holder1_cleans_after = len(holder1._clear_volatile_attrs.mock_calls)
        self.assertEqual(len(fit.st), 0)
        self.assertIs(len(fit.container), 0)
        self.assertIsNone(holder._fit)
        st_cleans_after = len(fit.stats._clear_volatile_attrs.mock_calls)
        holder_cleans_after = len(holder._clear_volatile_attrs.mock_calls)
        self.assertIs(len(fit.container), 3)
        self.assertIs(fit.container[0], holder1)
        self.assertIsNone(fit.container[1])
        self.assertIs(fit.container[2], holder2)
        self.assertIs(holder1._fit, fit)

src/e/o/Eos-HEAD/tests/fit/holder_mixin/damage_dealer/specials/test_nominal_volley.py   Eos(Download)
        mixin.attributes[Attribute.damage_multiplier] = 5.5
        volley = mixin.get_nominal_volley()
        self.assertIsNone(volley.em)
        self.assertAlmostEqual(volley.thermal, 34.65)
        self.assertAlmostEqual(volley.kinetic, 40.7)
        volley = mixin.get_nominal_volley()
        self.assertAlmostEqual(volley.em, 28.6)
        self.assertIsNone(volley.thermal)
        self.assertAlmostEqual(volley.kinetic, 40.7)
        self.assertAlmostEqual(volley.explosive, 46.75)
        self.assertAlmostEqual(volley.em, 28.6)
        self.assertAlmostEqual(volley.thermal, 34.65)
        self.assertIsNone(volley.kinetic)
        self.assertAlmostEqual(volley.explosive, 46.75)
        self.assertAlmostEqual(volley.total, 110)
        self.assertAlmostEqual(volley.thermal, 34.65)
        self.assertAlmostEqual(volley.kinetic, 40.7)
        self.assertIsNone(volley.explosive)
        self.assertAlmostEqual(volley.total, 103.95)
 
    def test_no_attrib_all(self):
        mixin = self.mixin
        mixin.attributes[Attribute.damage_multiplier] = 5.5
        volley = mixin.get_nominal_volley()
        self.assertIsNone(volley.em)

  1 | 2 | 3  Next