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

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

src/e/o/Eos-HEAD/tests/fit/holder_container/module_charge/test_module_charge.py   Eos(Download)
        non_charge_cleans_before = len(non_charge._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(TypeError, module.__setattr__, 'charge', non_charge)
        # Checks
        self.assertIsNone(module.charge)
        non_charge_cleans_before = len(non_charge._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(TypeError, module.__setattr__, 'charge', non_charge)
        # Checks
        self.assertIs(module.charge, charge)
        charge_other_cleans_before = len(charge_other._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(ValueError, module.__setattr__, 'charge', charge_other)
        # Checks
        self.assertEqual(len(fit_other.lt), 0)
        charge_other_cleans_before = len(charge_other._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(ValueError, module.__setattr__, 'charge', charge_other)
        # Checks
        self.assertEqual(len(fit_other.lt), 0)
        non_charge_cleans_before = len(non_charge._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(TypeError, module.__setattr__, 'charge', non_charge)
        # Checks
        self.assertEqual(len(fit.lt), 0)

src/e/o/Eos-HEAD/tests/fit/holder_container/ordered/test_place.py   Eos(Download)
        holder_cleans_before = len(holder._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(TypeError, fit.container.place, 3, None)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        holder2_cleans_before = len(holder2._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(TypeError, fit.container.place, 1, None)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        holder2_cleans_before = len(holder2._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(SlotTakenError, fit.container.place, 0, holder2)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        holder_cleans_before = len(holder._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(TypeError, fit.container.place, 0, None)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        holder_cleans_before = len(holder._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(TypeError, fit.container.place, 2, holder)
        # Checks
        self.assertEqual(len(fit.lt), 0)

src/e/o/Eos-HEAD/tests/fit/holder_container/direct/test_ship.py   Eos(Download)
        holder_cleans_before = len(holder._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(TypeError, fit.__setattr__, 'ship', holder)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        st_other_cleans_before = len(fit_other.stats._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(ValueError, fit.__setattr__, 'ship', holder)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        holder2_cleans_before = len(holder2._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(TypeError, fit.__setattr__, 'ship', holder2)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        st_other_cleans_before = len(fit_other.stats._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(ValueError, fit.__setattr__, 'ship', holder2)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        holder_cleans_before = len(holder._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(TypeError, fit.__setattr__, 'ship', holder)
        # Checks
        self.assertEqual(len(fit.lt), 0)

src/e/o/Eos-HEAD/tests/fit/holder_container/ordered/test_insert.py   Eos(Download)
        holder3_cleans_before = len(holder3._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(TypeError, fit.container.insert, 1, holder3)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        st_other_cleans_before = len(fit_other.stats._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(ValueError, fit.container.insert, 1, holder3)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        holder_cleans_before = len(holder._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(TypeError, fit.container.insert, 4, holder)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        st_other_cleans_before = len(fit_other.stats._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(ValueError, fit.container.insert, 4, holder)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        holder3_cleans_before = len(holder3._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(TypeError, fit.container.insert, 1, holder3)
        # Checks
        self.assertEqual(len(fit.lt), 2)

src/e/o/Eos-HEAD/tests/fit/holder_container/unordered/test_restricted_set.py   Eos(Download)
    def test_detached_add_none(self):
        fit = self.make_fit()
        # Action
        st_cleans_before = len(fit.stats._clear_volatile_attrs.mock_calls)
        self.assertRaises(TypeError, fit.container.add, None)
        holder_cleans_before = len(holder._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(TypeError, fit.container.add, holder)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        st_other_cleans_before = len(fit_other.stats._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(ValueError, fit.container.add, holder)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        holder2_cleans_before = len(holder2._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(ValueError, fit.container.add, holder2)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        holder_cleans_before = len(holder._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(KeyError, fit.container.remove, holder)
        # Checks
        self.assertEqual(len(fit.lt), 0)

src/e/o/Eos-HEAD/tests/fit/holder_container/unordered/test_set.py   Eos(Download)
    def test_detached_add_none(self):
        fit = self.make_fit()
        st_cleans_before = len(fit.stats._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(TypeError, fit.container.add, None)
        holder_cleans_before = len(holder._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(TypeError, fit.container.add, holder)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        st_other_cleans_before = len(fit_other.stats._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(ValueError, fit.container.add, holder)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        holder_cleans_before = len(holder._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(KeyError, fit.container.remove, holder)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        st_cleans_before = len(fit.stats._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(TypeError, fit.container.add, None)
        # Checks
        self.assertEqual(len(fit.lt), 0)

src/e/o/Eos-HEAD/tests/fit/holder_mixin/tanking/test_hp.py   Eos(Download)
        st_cleans_before = len(fit.stats._clear_volatile_attrs.mock_calls)
        holder_cleans_before = len(holder._clear_volatile_attrs.mock_calls)
        self.assertRaises(TypeError, holder.hp.__setattr__, 'hull', 'a')
        st_cleans_between1 = len(fit.stats._clear_volatile_attrs.mock_calls)
        holder_cleans_between1 = len(holder._clear_volatile_attrs.mock_calls)
        self.assertEqual(st_cleans_between1 - st_cleans_before, 0)
        self.assertEqual(holder_cleans_between1 - holder_cleans_before, 0)
        self.assertRaises(TypeError, holder.hp.__setattr__, 'armor', 'b')
        self.assertEqual(st_cleans_between2 - st_cleans_between1, 0)
        self.assertEqual(holder_cleans_between2 - holder_cleans_between1, 0)
        self.assertRaises(TypeError, holder.hp.__setattr__, 'shield', 'c')
        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_free.py   Eos(Download)
        holder2_cleans_before = len(holder2._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(ValueError, fit.container.free, None)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        holder2_cleans_before = len(holder2._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(ValueError, fit.container.free, holder2)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        holder2_cleans_before = len(holder2._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(ValueError, fit.container.free, holder1)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        holder_cleans_before = len(holder._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(IndexError, fit.container.free, 5)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        holder2_cleans_before = len(holder2._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(ValueError, fit.container.free, None)
        # Checks
        self.assertEqual(len(fit.lt), 2)

src/e/o/Eos-HEAD/tests/fit/holder_container/ordered/test_remove.py   Eos(Download)
        holder2_cleans_before = len(holder2._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(ValueError, fit.container.remove, holder2)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        holder2_cleans_before = len(holder2._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(ValueError, fit.container.remove, holder1)
        # checks
        self.assertEqual(len(fit.lt), 0)
        holder_cleans_before = len(holder._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(ValueError, fit.container.remove, None)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        holder_cleans_before = len(holder._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(IndexError, fit.container.remove, 5)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        holder2_cleans_before = len(holder2._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(ValueError, fit.container.remove, holder2)
        # Checks
        self.assertEqual(len(fit.lt), 1)

src/e/o/Eos-HEAD/tests/fit/holder_container/ordered/test_equip.py   Eos(Download)
    def test_detached_none_to_empty(self):
        fit = self.make_fit()
        st_cleans_before = len(fit.stats._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(TypeError, fit.container.equip, None)
        holder_cleans_before = len(holder._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(TypeError, fit.container.equip, holder)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        st_other_cleans_before = len(fit_other.stats._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(ValueError, fit.container.equip, holder)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        st_cleans_before = len(fit.stats._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(TypeError, fit.container.equip, None)
        # Checks
        self.assertEqual(len(fit.lt), 0)
        holder_cleans_before = len(holder._clear_volatile_attrs.mock_calls)
        # Action
        self.assertRaises(TypeError, fit.container.equip, holder)
        # Checks
        self.assertEqual(len(fit.lt), 0)

  1 | 2  Next