Skip to content

Commit b00586d

Browse files
committed
fix path issue on Win32
1 parent ce023c6 commit b00586d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

open-codegen/test/test_ocp.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import json
22
import os
3+
import sys
4+
import tempfile
35
import unittest
46

57
import casadi.casadi as cs
@@ -60,7 +62,10 @@ def run(self, p, initial_guess=None, initial_lagrange_multipliers=None, initial_
6062

6163

6264
class OcpTestCase(unittest.TestCase):
63-
TEST_DIR = ".python_test_build_ocp"
65+
if sys.platform == "win32":
66+
TEST_DIR = os.path.join(tempfile.gettempdir(), "og_ocp")
67+
else:
68+
TEST_DIR = ".python_test_build_ocp"
6469

6570
@staticmethod
6671
def get_open_local_absolute_path():

0 commit comments

Comments
 (0)