annoy
annoy copied to clipboard
[MSVC] Annoy failed to run test on Windows
Hi all, Recently, we update the commit of annoy and it failed to run test on Windows, could you please take a look at this issue? Thanks.
Repro steps:
- git clone https://github.com/spotify/annoy F:\gitP\spotify\annoy
- git -C "F:\gitP\spotify\annoy" reset --hard 7595fb3
- python.exe -m pip install numpy h5py pytest
- python setup.py build
- python setup.py nosetests
Actual:
======================================================================
ERROR: test suite for <module 'on_disk_build_test' from 'F:\\gitP\\spotify\\annoy\\test\\on_disk_build_test.py'>
----------------------------------------------------------------------
Traceback (most recent call last):
File "f:\gitp\spotify\annoy\.eggs\nose-1.3.7-py3.9.egg\nose\suite.py", line 210, in run
self.setUp()
File "f:\gitp\spotify\annoy\.eggs\nose-1.3.7-py3.9.egg\nose\suite.py", line 293, in setUp
self.setupContext(ancestor)
File "f:\gitp\spotify\annoy\.eggs\nose-1.3.7-py3.9.egg\nose\suite.py", line 316, in setupContext
try_run(context, names)
File "f:\gitp\spotify\annoy\.eggs\nose-1.3.7-py3.9.egg\nose\util.py", line 471, in try_run
return func()
File "C:\Python39\lib\site-packages\_pytest\fixtures.py", line 1173, in result
fail(message, pytrace=False)
File "C:\Python39\lib\site-packages\_pytest\outcomes.py", line 196, in fail
raise Failed(msg=reason, pytrace=pytrace)
Failed: Fixture "setUp" called directly. Fixtures are not meant to be called directly,
but are created automatically when test functions request them as parameters.
See https://docs.pytest.org/en/stable/explanation/fixtures.html for more information about fixtures, and
https://docs.pytest.org/en/stable/deprecations.html#calling-fixtures-directly about how to update your code.
======================================================================
FAIL: angular_index_test.test_include_dists
----------------------------------------------------------------------
Traceback (most recent call last):
File "f:\gitp\spotify\annoy\.eggs\nose-1.3.7-py3.9.egg\nose\case.py", line 198, in runTest
self.test(*self.arg)
File "F:\gitP\spotify\annoy\test\angular_index_test.py", line 183, in test_include_dists
assert dists[0] == pytest.approx(0.0)
AssertionError
----------------------------------------------------------------------
Ran 109 tests in 271.251s
FAILED (errors=1, failures=1)
Expected: run test ok.
I also tried the latest commit: 5c8d68a, same result. The commit 0457742 is ok. OS: Windows server 2022 VS: VS022 17.5.5 detailed log: test.log.2.log
That's strange – I can take a look!