def test_negative_ciphers_negative_by_default(self): """ Long Decimal must be negative by default if any cipher in ciphers is negative. """ ciphers_1 = [-1, 2, 3] ciphers_2 = [1, -2, 3] ld1 = LongDecimal(ciphers=ciphers_1) ld2 = LongDecimal(ciphers=ciphers_2) self.assertTrue(ld1.isnegative()) self.assertFalse(ld2.isnegative())
def test_isnegative(self): """Test isnegative method.""" ciphers = ciphers_generator() ld = LongDecimal(ciphers=ciphers, negative=True) self.assertTrue(ld.isnegative())