Attempt at making BAT work on Windows

All BlendPath instances will use forward slashes, and there should be
more use of PurePosixPath instead of Path.
This commit is contained in:
Sybren A. Stüvel
2019-01-02 15:14:50 +01:00
parent 37578811d7
commit 5635895d0c
4 changed files with 15 additions and 13 deletions
+4 -3
View File
@@ -162,7 +162,7 @@ class PackTest(AbstractPackTest):
def test_execute_rewrite(self):
infile, _ = self._pack_with_rewrite()
extpath = pathlib.Path('//_outside_project', *self.blendfiles.parts[1:])
extpath = pathlib.PurePosixPath('//_outside_project', *self.blendfiles.parts[1:])
extbpath = bpathlib.BlendPath(extpath)
# Those libraries should be properly rewritten.
@@ -209,8 +209,9 @@ class PackTest(AbstractPackTest):
seq = ed.get_pointer((b'seqbase', b'first'))
seq_strip = seq.get_pointer(b'strip')
as_bytes = str((self.blendfiles / 'imgseq').absolute()).encode()
relpath = b'//_outside_project%b' % as_bytes
imgseq_path = (self.blendfiles / 'imgseq').absolute()
as_bytes = str(imgseq_path.relative_to(imgseq_path.anchor)).encode()
relpath = bpathlib.BlendPath(b'//_outside_project') / as_bytes
# The image sequence base path should be rewritten.
self.assertEqual(b'SQ000210.png', seq[b'name'])