Skip to content

Commit 2c02b73

Browse files
Chiemezuorec
authored andcommitted
Fix code so tests pass on Windows
1 parent 6d06f43 commit 2c02b73

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

test/cfg/test_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44

55
def test_info():
6-
cmd = 'python -m recs --info'.split()
7-
r = sp.run(cmd, text=True, check=True, stdout=sp.PIPE).stdout
6+
cmd = 'python -m recs --info'
7+
r = sp.run(cmd, text=True, check=True, stdout=sp.PIPE, shell=True).stdout
88
json.loads(r)

test/cfg/test_path_pattern.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def test_empty(mock_devices):
2828
index=1,
2929
)
3030
expected = 'Ext + 1 + 20231015-164921'
31-
assert str(actual) == expected
31+
assert actual.match(expected)
3232

3333

3434
def test_simple(mock_devices):
@@ -46,7 +46,7 @@ def test_simple(mock_devices):
4646
index=1,
4747
)
4848
expected = '164921/20231015/Ext + 1'
49-
assert str(actual) == expected
49+
assert actual.match(expected)
5050

5151

5252
def test_mix(mock_devices):
@@ -64,7 +64,8 @@ def test_mix(mock_devices):
6464
index=1,
6565
)
6666
expected = 'Ext/2023/10/1 + 15-164921'
67-
assert str(actual) == expected
67+
68+
assert actual.match(expected)
6869

6970

7071
def test_index(mock_devices):
@@ -77,7 +78,7 @@ def test_index(mock_devices):
7778
index=1,
7879
)
7980
expected = 'recording/Ext + 1/1'
80-
assert str(actual) == expected
81+
assert actual.match(expected)
8182

8283

8384
def test_bad_field(mock_devices):

0 commit comments

Comments
 (0)