Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MSVC] Annoy failed to run test on Windows #652

Open
Zhaojun-Liu opened this issue Jun 13, 2023 · 1 comment
Open

[MSVC] Annoy failed to run test on Windows #652

Zhaojun-Liu opened this issue Jun 13, 2023 · 1 comment

Comments

@Zhaojun-Liu
Copy link

Zhaojun-Liu commented Jun 13, 2023

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:

  1. git clone https://github.com/spotify/annoy F:\gitP\spotify\annoy
  2. git -C "F:\gitP\spotify\annoy" reset --hard 7595fb3
  3. python.exe -m pip install numpy h5py pytest
  4. python setup.py build
  5. 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

@erikbern
Copy link
Collaborator

That's strange – I can take a look!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants