Skip to content

Commit 01331f8

Browse files
committed
Enable more unittests on windows
1 parent a2a8a43 commit 01331f8

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

graalpython/com.oracle.graal.python.test/src/tests/test_venv.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@
4444
import tempfile
4545

4646

47+
BINDIR = 'bin' if sys.platform != 'win32' else 'Scripts'
48+
EXESUF = '' if sys.platform != 'win32' else '.cmd'
49+
50+
4751
class VenvTest():
4852
def setUpClass(self):
4953
self.env_dir = os.path.realpath(tempfile.mkdtemp())
@@ -58,20 +62,21 @@ def test_create_and_use_basic_venv(self):
5862
run_output = ''
5963
try:
6064
subprocess.check_output([sys.executable, "-m", "venv", self.env_dir, "--without-pip"], stderr=subprocess.STDOUT)
61-
run = subprocess.getoutput(". %s/bin/activate; python -m site" % self.env_dir)
65+
run = subprocess.getoutput(f"{self.env_dir}/{BINDIR}/python{EXESUF} -m site")
6266
except subprocess.CalledProcessError as err:
6367
if err.output:
6468
run_output = err.output.decode(errors="replace")
6569
assert run, run_output
6670
assert "ENABLE_USER_SITE: False" in run, run
67-
assert self.env_dir in run, run
71+
if sys.platform != 'win32':
72+
assert self.env_dir in run, run
6873

6974
def test_create_and_use_venv_with_pip(self):
7075
run = None
7176
msg = ''
7277
try:
7378
subprocess.check_output([sys.executable, "-m", "venv", self.env_dir2], stderr=subprocess.STDOUT)
74-
run = subprocess.getoutput("%s/bin/python -m pip list" % self.env_dir2)
79+
run = subprocess.getoutput(f"{self.env_dir2}/{BINDIR}/python{EXESUF} -m pip list")
7580
except subprocess.CalledProcessError as err:
7681
if err.output:
7782
run_output = err.output.decode(errors="replace")

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/ctypes/CtypesModuleBuiltins.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@
155155
import com.oracle.graal.python.nodes.attributes.GetAttributeNode;
156156
import com.oracle.graal.python.nodes.attributes.ReadAttributeFromObjectNode;
157157
import com.oracle.graal.python.nodes.attributes.WriteAttributeToDynamicObjectNode;
158-
import com.oracle.graal.python.nodes.attributes.WriteAttributeToObjectNode;
159158
import com.oracle.graal.python.nodes.call.CallNode;
160159
import com.oracle.graal.python.nodes.call.special.LookupAndCallUnaryNode;
161160
import com.oracle.graal.python.nodes.function.PythonBuiltinBaseNode;

mx.graalpython/mx_graalpython.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,6 @@ def graalpython_gate_runner(args, tasks):
11861186
excluded_tests = [
11871187
"test_code.py", # forward slash in path problem
11881188
"test_csv.py",
1189-
"test_ctypes_callbacks.py", # ctypes error
11901189
"test_imports.py", # import posix
11911190
"test_locale.py",
11921191
"test_math.py",
@@ -1198,15 +1197,12 @@ def graalpython_gate_runner(args, tasks):
11981197
"test_posix.py", # import posix
11991198
"test_pyio.py",
12001199
"test_signal.py",
1201-
"test_ssl.py", # from_ssl import enum_certificates
12021200
"test_struct.py",
12031201
"test_structseq.py", # import posix
12041202
"test_subprocess.py",
12051203
"test_thread.py", # sys.getwindowsversion
12061204
"test_traceback.py",
1207-
"test_venv.py",
12081205
"test_zipimport.py", # sys.getwindowsversion
1209-
"test_zlib.py",
12101206
"test_ssl_java_integration.py",
12111207
"*/cpyext/test_abstract.py",
12121208
"*/cpyext/test_bytes.py",

0 commit comments

Comments
 (0)