Skip to content

Commit a1446ff

Browse files
Ken KundertKen Kundert
Ken Kundert
authored and
Ken Kundert
committed
support testing on borg pre-release versions
1 parent 213ed32 commit a1446ff

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

conftest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Add missing dependency command line options to pytest command.
22

33
import os
4+
import re
45
import pytest
56
from inform import Error, Info as CmdLineOpts
67
from shlib import Run, set_prefs
@@ -28,6 +29,9 @@ def dependency_options(request):
2829
raise SystemExit
2930
borg_version = borg.stdout
3031
borg_version = borg_version.split()[-1]
32+
borg_version = borg_version.partition('a')[0] # strip off alpha version
33+
borg_version = borg_version.partition('b')[0] # strip off beta version
34+
borg_version = borg_version.partition('rc')[0] # strip off release candidate version
3135
borg_version = tuple(int(i) for i in borg_version.split('.'))
3236
options.borg_version = borg_version
3337

0 commit comments

Comments
 (0)