Skip to content

Commit

Permalink
get rid of nose
Browse files Browse the repository at this point in the history
  • Loading branch information
MeggyCal committed Jan 20, 2021
1 parent be83fba commit 114da2a
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 11 deletions.
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
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ build_script:
- "python setup.py build"

test_script:
- "python setup.py nosetests"
- "PYTHONPATH=."
- "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

0 comments on commit 114da2a

Please sign in to comment.