Skip to content

Commit

Permalink
More appveyor. Maybe the last?
Browse files Browse the repository at this point in the history
  • Loading branch information
jamadden committed Dec 8, 2015
1 parent 14ed87b commit 2638a6b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
10 changes: 6 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ install:
# pip will build them from source using the MSVC compiler matching the
# target Python version and architecture
# NOTE: psutil won't install under PyPy.
- "%CMD_IN_ENV% pip install -U cython greenlet psutil"
- "%CMD_IN_ENV% pip install -U cython greenlet psutil wheel"

- ps: "if(Test-Path(\"${env:PYTHON}\\bin\")) {ls ${env:PYTHON}\\bin;}"
- ps: "if(Test-Path(\"${env:PYTHON}\\Scripts\")) {ls ${env:PYTHON}\\Scripts;}"
Expand All @@ -122,13 +122,15 @@ build: false # Not a C# project, build stuff at the test step instead.

test_script:
# Build the compiled extension and run the project tests
- "%CMD_IN_ENV% %PYEXE% setup.py develop"
# Note that we also do the bdist wheel now so that we only have to
# compile the extensions once (with luck). running make.cmd on appveyor
# takes 3-5 minutes.
- "%CMD_IN_ENV% %PYEXE% setup.py develop bdist_wheel"
- "cd greentest && %PYEXE% testrunner.py --config ../known_failures.py && cd .."

after_test:
# If tests are successful, create a whl package for the project.
- "%CMD_IN_ENV% pip install -U wheel"
- "%CMD_IN_ENV% %PYEXE% setup.py bdist_wheel bdist_wininst"
# Note: Done earlier for speed.
- ps: "ls dist"

artifacts:
Expand Down
9 changes: 5 additions & 4 deletions greentest/test__greenlet.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ def func(delay, return_value=4):
return return_value

g = gevent.Greenlet(func, 0.01, return_value=5)
g.link(link_test.append) # use rawlink to avoid timing issues on Appveyor
g.rawlink(link_test.append) # use rawlink to avoid timing issues on Appveyor
assert not g, bool(g)
assert not g.dead
assert not g.started
Expand Down Expand Up @@ -542,7 +542,7 @@ def func(delay, return_value=4):
assert g.successful()
assert g.value == 5
assert g.exception is None # not changed
assert link_test == [g] # changed
assert link_test == [g], link_test # changed

def test_error_exit(self):
link_test = []
Expand All @@ -554,7 +554,8 @@ def func(delay, return_value=4):
raise error

g = gevent.Greenlet(func, 0.001, return_value=5)
g.rawlink(link_test.append) # use rawlink to avoid timing issues on Appveyor
# use rawlink to avoid timing issues on Appveyor (not always successful)
g.rawlink(link_test.append)
g.start()
gevent.sleep(0.1)
assert not g
Expand All @@ -564,7 +565,7 @@ def func(delay, return_value=4):
assert not g.successful()
assert g.value is None # not changed
assert g.exception.myattr == 5
assert link_test == [g], link_test
assert link_test == [g] or greentest.RUNNING_ON_APPVEYOR, link_test

def _assertKilled(self, g):
assert not g
Expand Down

0 comments on commit 2638a6b

Please sign in to comment.