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

get rid of nose #529

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ It's all written in C++ with a handful of ugly optimizations for performance and

The code should support Windows, thanks to `Qiang Kou <https://github.com/thirdwing>`__ and `Timothy Riley <https://github.com/tjrileywisc>`__.

To run the tests, execute `python setup.py nosetests`. The test suite includes a big real world dataset that is downloaded from the internet, so it will take a few minutes to execute.
To run the tests, execute `python -m unittest`. The test suite includes a big real world dataset that is downloaded from the internet, so it will take a few minutes to execute.

Discuss
-------
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ build_script:
- "python setup.py build"

test_script:
- "python setup.py nosetests"
- "python -m unittest -v"
4 changes: 0 additions & 4 deletions setup.cfg

This file was deleted.

1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,5 @@
'Programming Language :: Python :: 3.6',
],
keywords='nns, approximate nearest neighbor search',
setup_requires=['nose>=1.0'],
tests_require=['numpy', 'h5py']
)
1 change: 0 additions & 1 deletion test/accuracy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
except ImportError:
from urllib.request import urlretrieve # Python 3
import gzip
from nose.plugins.attrib import attr

class AccuracyTest(unittest.TestCase):
def _get_index(self, dataset):
Expand Down
4 changes: 2 additions & 2 deletions test/hamming_index_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
# License for the specific language governing permissions and limitations under
# the License.

import unittest
import numpy
import random
from common import TestCase
from annoy import AnnoyIndex
from nose.plugins.skip import SkipTest


class HammingIndexTest(TestCase):
Expand Down Expand Up @@ -85,7 +85,7 @@ def test_many_vectors(self):
avg_dist = 1.0 * sum(dists) / len(dists)
self.assertLessEqual(avg_dist, 0.42)

@SkipTest # will fix later
@unittest.skip('will fix later')
def test_zero_vectors(self):
# Mentioned on the annoy-user list
bitstrings = [
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ setenv =
commands =
pip install numpy h5py
pip install .
python setup.py nosetests --verbosity=3
python -m unittest -v

[testenv:go]
setenv =
Expand Down