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

SPF-OST / pytrnsys / 15634577909

13 Jun 2025 12:29PM UTC coverage: 27.625%. Remained the same
15634577909

push

github

zuckerruebe
Truncate path if longer >= 260 chars.

0 of 1 new or added line in 1 file covered. (0.0%)

3860 of 13973 relevant lines covered (27.62%)

0.28 hits per line

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

62.96
/pytrnsys/rsim/command.py
1
import collections.abc as _cabc
1✔
2
import dataclasses as _dc
1✔
3
import pathlib as _pl
1✔
4
import typing as _tp
1✔
5

6
import shortpath83 as _sp83
1✔
7

8

9
@_dc.dataclass
1✔
10
class Command:
1✔
11
    MAX_DECK_FILE_PATH_LENGTH: _tp.ClassVar[int] = 260
1✔
12

13
    trnsysExeFilePath: _pl.Path
1✔
14
    deckFilePath: _pl.Path
1✔
15
    trnsysFlags: _cabc.Sequence[str]
1✔
16

17
    @property
1✔
18
    def truncatedDeckFilePath(self) -> _pl.Path:
1✔
19
        deckFilePathString = str(self.deckFilePath)
×
20

21
        pathLength = len(deckFilePathString)
×
NEW
22
        if pathLength < self.MAX_DECK_FILE_PATH_LENGTH:
×
23
            return self.deckFilePath
×
24

25
        truncatedDeckFilePathString = _sp83.get_short_path_name(deckFilePathString)
×
26
        truncatedDeckFilePath = _pl.Path(truncatedDeckFilePathString)
×
27
        return truncatedDeckFilePath
×
28

29
    @property
1✔
30
    def args(self) -> _cabc.Sequence[str | _pl.Path]:
1✔
31
        args: _cabc.Sequence[str | _pl.Path] = [self.trnsysExeFilePath, self.truncatedDeckFilePath, *self.trnsysFlags]
×
32

33
        return args
×
34

35
    @property
1✔
36
    def cwd(self) -> _pl.Path:
1✔
37
        return self.deckFilePath.parent
×
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