• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CityOfZion / neo3-boa / e084b44c-1a5f-4649-92cd-d3ed06099181

05 Mar 2024 05:58PM UTC coverage: 92.023% (-0.08%) from 92.107%
e084b44c-1a5f-4649-92cd-d3ed06099181

push

circleci

Mirella de Medeiros
CU-86drpnc9z - Drop support to Python 3.10

20547 of 22328 relevant lines covered (92.02%)

1.84 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

90.48
/boa3/internal/model/operation/binary/logical/booleanor.py
1
from boa3.internal.model.operation.binary.binaryoperation import BinaryOperation
2✔
2
from boa3.internal.model.operation.operator import Operator
2✔
3
from boa3.internal.model.type.type import IType, Type
2✔
4
from boa3.internal.neo.vm.opcode.Opcode import Opcode
2✔
5

6

7
class BooleanOr(BinaryOperation):
2✔
8
    """
9
    A class used to represent the boolean or operation
10

11
    :ivar operator: the operator of the operation. Inherited from :class:`IOperation`
12
    :ivar left: the left operand type. Inherited from :class:`BinaryOperation`
13
    :ivar right: the left operand type. Inherited from :class:`BinaryOperation`
14
    :ivar result: the result type of the operation.  Inherited from :class:`IOperation`
15
    """
16
    _valid_types: list[IType] = [Type.bool]
2✔
17

18
    def __init__(self, left: IType = Type.bool, right: IType = None):
2✔
19
        self.operator: Operator = Operator.Or
2✔
20
        super().__init__(left, right)
2✔
21

22
    def validate_type(self, *types: IType) -> bool:
2✔
23
        if len(types) != self.number_of_operands:
2✔
24
            return False
×
25
        left: IType = types[0]
2✔
26
        right: IType = types[1]
2✔
27

28
        return left == right and any(_type.is_type_of(left) for _type in self._valid_types)
2✔
29

30
    def _get_result(self, left: IType, right: IType) -> IType:
2✔
31
        if self.validate_type(left, right):
2✔
32
            return Type.bool
2✔
33
        else:
34
            return Type.none
×
35

36
    def generate_internal_opcodes(self, code_generator):
2✔
37
        code_generator.insert_opcode(Opcode.BOOLOR)
2✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc