Enabling hy2py test on Windows
This commit is contained in:
parent
66dadf2d1a
commit
bb567aab3e
2
Makefile
2
Makefile
@ -41,7 +41,7 @@ tox: venv
|
|||||||
tox
|
tox
|
||||||
|
|
||||||
flake:
|
flake:
|
||||||
flake8 hy
|
flake8 hy tests
|
||||||
|
|
||||||
clear:
|
clear:
|
||||||
clear
|
clear
|
||||||
|
4
make.bat
4
make.bat
@ -70,8 +70,8 @@ goto :EOF
|
|||||||
|
|
||||||
if "%1" == "flake" (
|
if "%1" == "flake" (
|
||||||
:flake
|
:flake
|
||||||
echo.flake8 hy
|
echo.flake8 hy tests
|
||||||
flake8 hy
|
flake8 hy tests
|
||||||
goto :EOF
|
goto :EOF
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- encoding: utf-8 -*-
|
||||||
# Copyright (c) 2013 Julien Danjou <julien@danjou.info>
|
# Copyright (c) 2013 Julien Danjou <julien@danjou.info>
|
||||||
# Copyright (c) 2013 Will Kahn-Greene <willg@bluesock.org>
|
# Copyright (c) 2013 Will Kahn-Greene <willg@bluesock.org>
|
||||||
|
# Copyright (c) 2014 Bob Tolbert <bob@tolbert.org>
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
# copy of this software and associated documentation files (the "Software"),
|
# copy of this software and associated documentation files (the "Software"),
|
||||||
@ -23,8 +24,6 @@
|
|||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from nose.plugins.skip import SkipTest
|
|
||||||
|
|
||||||
|
|
||||||
def run_cmd(cmd, stdin_data=None):
|
def run_cmd(cmd, stdin_data=None):
|
||||||
p = subprocess.Popen(cmd,
|
p = subprocess.Popen(cmd,
|
||||||
@ -125,16 +124,13 @@ def test_bin_hyc_missing_file():
|
|||||||
|
|
||||||
|
|
||||||
def test_hy2py():
|
def test_hy2py():
|
||||||
# and running this script this way doesn't work on Windows
|
|
||||||
if os.name == "nt":
|
|
||||||
raise SkipTest("doesn't work on Windows")
|
|
||||||
|
|
||||||
i = 0
|
i = 0
|
||||||
for dirpath, dirnames, filenames in os.walk("tests/native_tests"):
|
for dirpath, dirnames, filenames in os.walk("tests/native_tests"):
|
||||||
for f in filenames:
|
for f in filenames:
|
||||||
if f.endswith(".hy"):
|
if f.endswith(".hy"):
|
||||||
i += 1
|
i += 1
|
||||||
ret = run_cmd("bin/hy2py -s -a " + os.path.join(dirpath, f))
|
ret = run_cmd("python bin/hy2py -s -a "
|
||||||
|
+ os.path.join(dirpath, f))
|
||||||
assert ret[0] == 0, f
|
assert ret[0] == 0, f
|
||||||
assert len(ret[1]) > 1, f
|
assert len(ret[1]) > 1, f
|
||||||
assert len(ret[2]) == 0, f
|
assert len(ret[2]) == 0, f
|
||||||
|
Loading…
Reference in New Issue
Block a user