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

Beakerboy / MS-OVBA / 22534546373

01 Mar 2026 02:56AM UTC coverage: 76.355%. First build
22534546373

Pull #98

github

web-flow
Merge 2d48aee72 into b766bdecc
Pull Request #98: Update module_base.py

399 of 537 new or added lines in 18 files covered. (74.3%)

465 of 609 relevant lines covered (76.35%)

3.82 hits per line

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

95.65
/src/ms_ovba/Models/Fields/project_reference.py
1
from typing import TypeVar
5✔
2

3

4
T = TypeVar('T', bound='ProjectReference')
5✔
5

6

7
class ProjectReference():
5✔
8
    """
9
    2.1.1.12
10
    Specifies the identifier of a VBA project.
11

12
    ProjectReference = "*\" ProjectKind ProjectPath
13
    ProjectKind = %x41-44
14
    ProjectPath = *(%x01-FF}
15
    """
16
    def __init__(self: T, project_path: str, embedded: bool = True) -> None:
5✔
17
        self._project_path = project_path
5✔
18
        self._embedded = embedded
5✔
19

20
    # Dunder Methods
21
    def __str__(self) -> str:
5✔
22
        return self._header() + \
5✔
23
            str(self._project_path)
24

25
    def __len__(self) -> int:
5✔
26
        return len(str(self))
5✔
27

28
    def relative(self: T) -> T:
5✔
29
        """
30
        Strip off the path and just return the file.
31
        """
32
        # Find last '\'
33
        pos = self._project_path.rfind('\\')
5✔
34

35
        rel_path = self._project_path[pos + 1:]
5✔
36
        return ProjectReference(rel_path, self._embedded)
5✔
37

38
    def _header(self: T) -> str:
5✔
39
        project_kind = 0x41
5✔
40
        if not self._is_windows_path(self._project_path):
5✔
NEW
41
            project_kind += 1
×
42
        if self._embedded:
5✔
43
            project_kind += 2
5✔
44
        return "*\\" + \
5✔
45
            chr(project_kind)
46

47
    def _is_windows_path(self: T, path: str) -> bool:
5✔
48
        return path[0] != '/'
5✔
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