Coverage for functions \ flipdare \ result \ outcome.py: 100%

21 statements  

« prev     ^ index     » next       coverage.py v7.13.0, created at 2026-05-08 12:22 +1000

1#!/usr/bin/env python 

2# Copyright (c) 2026 Flipdare Pty Ltd. All rights reserved. 

3# 

4# This file is part of Flipdare's proprietary software and contains 

5# confidential and copyrighted material. Unauthorised copying, 

6# modification, distribution, or use of this file is strictly 

7# prohibited without prior written permission from Flipdare Pty Ltd. 

8# 

9# This software includes third-party components licensed under MIT, 

10# BSD, and Apache 2.0 licences. See THIRD_PARTY_NOTICES for details. 

11# 

12from enum import StrEnum 

13 

14 

15class Outcome(StrEnum): 

16 OK = "ok" 

17 ERROR = "failure" 

18 WARNING = "warning" 

19 SKIPPED = "skipped" 

20 

21 @property 

22 def is_ok(self) -> bool: 

23 return self == Outcome.OK 

24 

25 @property 

26 def is_skipped(self) -> bool: 

27 return self == Outcome.SKIPPED 

28 

29 @property 

30 def is_warning(self) -> bool: 

31 return self == Outcome.WARNING 

32 

33 @property 

34 def is_error(self) -> bool: 

35 return self == Outcome.ERROR 

36 

37 @property 

38 def label(self) -> str: 

39 return self.value.upper()