Skip to content

Commit 8ff9020

Browse files
committed
Completed slashes test
1 parent 671f23b commit 8ff9020

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

tests/test_tools.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import os
2+
13
from pathlib import Path
24
from pyfpga.factory import Factory
35

@@ -88,11 +90,15 @@ def generate(tool, part):
8890
prj.make()
8991
prj.prog()
9092
#
93+
separator = '\\'
94+
#
9195
for path in prj.data['includes']:
92-
assert "\\" not in path, f'invalid path {path}'
96+
assert separator not in path, f'invalid path {path}'
9397
for category in ['files', 'constraints']:
9498
for path in prj.data[category]:
95-
assert "\\" not in path, f'invalid path {path}'
99+
assert separator not in path, f'invalid path {path}'
96100
#
101+
if os.name == 'nt' and tool in ['ise', 'openflow', 'quartus']:
102+
separator = '/'
97103
path = prj._get_bitstream()
98-
assert "\\" not in path, f'invalid path {path}'
104+
assert separator not in path, f'invalid path {path}'

0 commit comments

Comments
 (0)