diff --git a/MANIFEST.in b/MANIFEST.in --- a/MANIFEST.in +++ b/MANIFEST.in @@ -5,3 +5,4 @@ include version.txt recursive-include sql * recursive-include swh/indexer/sql *.sql +recursive-include swh/indexer/data * diff --git a/debian/control b/debian/control --- a/debian/control +++ b/debian/control @@ -7,14 +7,14 @@ python3-all, python3-chardet (>= 2.3.0~), python3-click, - python3-nose, + python3-pytest, python3-pygments, python3-magic, python3-setuptools, python3-swh.core (>= 0.0.44~), python3-swh.model (>= 0.0.15~), python3-swh.objstorage (>= 0.0.13~), - python3-swh.scheduler (>= 0.0.14~), + python3-swh.scheduler (>= 0.0.33~), python3-swh.storage (>= 0.0.102~), python3-vcversioner Standards-Version: 3.9.6 @@ -25,7 +25,7 @@ Depends: python3-swh.core (>= 0.0.44~), python3-swh.model (>= 0.0.15~), python3-swh.objstorage (>= 0.0.13~), - python3-swh.scheduler (>= 0.0.14~), + python3-swh.scheduler (>= 0.0.33~), python3-swh.storage (>= 0.0.102~), ${misc:Depends}, ${python3:Depends} @@ -37,7 +37,7 @@ python3-swh.core (>= 0.0.44~), python3-swh.model (>= 0.0.15~), python3-swh.objstorage (>= 0.0.13~), - python3-swh.scheduler (>= 0.0.14~), + python3-swh.scheduler (>= 0.0.33~), python3-swh.storage (>= 0.0.102~), python3-swh.indexer.storage (= ${binary:Version}), universal-ctags (>= 0.8~), diff --git a/debian/rules b/debian/rules --- a/debian/rules +++ b/debian/rules @@ -1,7 +1,7 @@ #!/usr/bin/make -f export PYBUILD_NAME=swh.indexer -export PYBUILD_TEST_ARGS=-sv -a !db,!fs +export PYBUILD_TEST_ARGS=-m 'not db and not fs' %: dh $@ --with python3 --buildsystem=pybuild diff --git a/requirements-swh.txt b/requirements-swh.txt --- a/requirements-swh.txt +++ b/requirements-swh.txt @@ -1,5 +1,5 @@ swh.core >= 0.0.44 swh.model >= 0.0.15 swh.objstorage >= 0.0.13 -swh.scheduler >= 0.0.14 +swh.scheduler >= 0.0.33 swh.storage >= 0.0.102 diff --git a/requirements.txt b/requirements.txt --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,5 @@ -# Add here external Python modules dependencies, one per line. Module names -# should match https://pypi.python.org/pypi names. For the full spec or -# dependency lines, see https://pip.readthedocs.org/en/1.1/requirements.html vcversioner pygments click chardet - file_magic diff --git a/swh/indexer/tests/storage/test_converters.py b/swh/indexer/tests/storage/test_converters.py --- a/swh/indexer/tests/storage/test_converters.py +++ b/swh/indexer/tests/storage/test_converters.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2017 The Software Heritage developers +# Copyright (C) 2015-2018 The Software Heritage developers # See the AUTHORS file at the top-level directory of this distribution # License: GNU General Public License version 3, or any later version # See top-level LICENSE file for more information @@ -52,7 +52,7 @@ actual_ctags = list(converters.ctags_to_db(input_ctag)) # then - self.assertEquals(actual_ctags, expected_ctags) + self.assertEqual(actual_ctags, expected_ctags) def test_db_to_ctags(self): input_ctags = { @@ -84,7 +84,7 @@ actual_ctags = converters.db_to_ctags(input_ctags) # then - self.assertEquals(actual_ctags, expected_ctags) + self.assertEqual(actual_ctags, expected_ctags) def test_db_to_mimetype(self): input_mimetype = { @@ -111,7 +111,7 @@ actual_mimetype = converters.db_to_mimetype(input_mimetype) - self.assertEquals(actual_mimetype, expected_mimetype) + self.assertEqual(actual_mimetype, expected_mimetype) def test_db_to_language(self): input_language = { @@ -136,7 +136,7 @@ actual_language = converters.db_to_language(input_language) - self.assertEquals(actual_language, expected_language) + self.assertEqual(actual_language, expected_language) def test_db_to_fossology_license(self): input_license = { @@ -160,7 +160,7 @@ actual_license = converters.db_to_fossology_license(input_license) - self.assertEquals(actual_license, expected_license) + self.assertEqual(actual_license, expected_license) def test_db_to_metadata(self): input_metadata = { @@ -185,4 +185,4 @@ actual_metadata = converters.db_to_metadata(input_metadata) - self.assertEquals(actual_metadata, expected_metadata) + self.assertEqual(actual_metadata, expected_metadata) diff --git a/swh/indexer/tests/storage/test_storage.py b/swh/indexer/tests/storage/test_storage.py --- a/swh/indexer/tests/storage/test_storage.py +++ b/swh/indexer/tests/storage/test_storage.py @@ -605,7 +605,7 @@ def test_content_ctags_search_no_result(self): actual_ctags = list(self.storage.content_ctags_search('counter')) - self.assertEquals(actual_ctags, []) + self.assertEqual(actual_ctags, []) def test_content_ctags_add__add_new_ctags_added(self): # given @@ -1523,11 +1523,11 @@ # add it actual_tools = list(self.storage.indexer_configuration_add([tool])) - self.assertEquals(len(actual_tools), 1) + self.assertEqual(len(actual_tools), 1) actual_tool = actual_tools[0] self.assertIsNotNone(actual_tool) # now it exists new_id = actual_tool.pop('id') - self.assertEquals(actual_tool, tool) + self.assertEqual(actual_tool, tool) actual_tools2 = list(self.storage.indexer_configuration_add([tool])) actual_tool2 = actual_tools2[0] diff --git a/swh/indexer/tests/test_mimetype.py b/swh/indexer/tests/test_mimetype.py --- a/swh/indexer/tests/test_mimetype.py +++ b/swh/indexer/tests/test_mimetype.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017 The Software Heritage developers +# Copyright (C) 2017-2018 The Software Heritage developers # See the AUTHORS file at the top-level directory of this distribution # License: GNU General Public License version 3, or any later version # See top-level LICENSE file for more information @@ -98,7 +98,7 @@ }] self.assertFalse(self.indexer.idx_storage.conflict_update) - self.assertEquals(expected_results, self.indexer.idx_storage.state) + self.assertEqual(expected_results, self.indexer.idx_storage.state) def test_index_update(self): # given @@ -130,7 +130,7 @@ }] self.assertTrue(self.indexer.idx_storage.conflict_update) - self.assertEquals(expected_results, self.indexer.idx_storage.state) + self.assertEqual(expected_results, self.indexer.idx_storage.state) def test_index_one_unknown_sha1(self): # given @@ -150,4 +150,4 @@ }] self.assertTrue(self.indexer.idx_storage.conflict_update) - self.assertEquals(expected_results, self.indexer.idx_storage.state) + self.assertEqual(expected_results, self.indexer.idx_storage.state)