project_name string | class_name string | class_modifiers string | class_implements int64 | class_extends int64 | function_name string | function_body string | cyclomatic_complexity int64 | NLOC int64 | num_parameter int64 | num_token int64 | num_variable int64 | start_line int64 | end_line int64 | function_index int64 | function_params string | function_variable string | function_return_type string | function_body_line_type string | function_num_functions int64 | function_num_lines int64 | outgoing_function_count int64 | outgoing_function_names string | incoming_function_count int64 | incoming_function_names string | lexical_representation string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
anaconda_anaconda-client | Test | public | 0 | 1 | test_login | def test_login(self, urls, data, getpass, store_token):data.return_value = 'test_user'getpass.return_value = 'password'urls.register(path='/', method='HEAD', status=200)urls.register(path='/authentication-type', content='{"authentication_type": "password"}')auth = urls.register(method='POST', path='/authentications', c... | 1 | 13 | 5 | 147 | 0 | 18 | 35 | 18 | self,urls,data,getpass,store_token | [] | None | {"Assign": 3, "Expr": 9} | 14 | 18 | 14 | ["urls.register", "urls.register", "urls.register", "main", "self.assertIn", "self.stream.getvalue", "auth.assertCalled", "self.assertIn", "self.assertIn", "self.assertTrue", "self.assertEqual", "unittest.mock.patch", "unittest.mock.patch", "unittest.mock.patch"] | 0 | [] | The function (test_login) defined within the public class called Test, that inherit another class.The function start at line 18 and ends at 35. It contains 13 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [18.0] and does not return any value. It declares 14.0 functions, an... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_login_compatible | def test_login_compatible(self, urls, data, getpass, store_token):data.return_value = 'test_user'getpass.return_value = 'password'urls.register(path='/', method='HEAD', status=200)urls.register(path='/authentication-type', status=404)auth = urls.register(method='POST', path='/authentications', content='{"token": "a-tok... | 1 | 13 | 5 | 147 | 0 | 41 | 58 | 41 | self,urls,data,getpass,store_token | [] | None | {"Assign": 3, "Expr": 9} | 14 | 18 | 14 | ["urls.register", "urls.register", "urls.register", "main", "self.assertIn", "self.stream.getvalue", "auth.assertCalled", "self.assertIn", "self.assertIn", "self.assertTrue", "self.assertEqual", "unittest.mock.patch", "unittest.mock.patch", "unittest.mock.patch"] | 0 | [] | The function (test_login_compatible) defined within the public class called Test, that inherit another class.The function start at line 41 and ends at 58. It contains 13 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [41.0] and does not return any value. It declares 14.0 fu... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_packages_array_param | def test_packages_array_param(self, urls):api = Binstar()urls.register(method='GET', path='/packages/u1?package_type=conda&package_type=pypi', content='[]')api.user_packages('u1', package_type=['conda', 'pypi'])urls.assertAllCalled() | 1 | 5 | 2 | 47 | 0 | 9 | 15 | 9 | self,urls | [] | None | {"Assign": 1, "Expr": 3} | 4 | 7 | 4 | ["Binstar", "urls.register", "api.user_packages", "urls.assertAllCalled"] | 0 | [] | The function (test_packages_array_param) defined within the public class called Test, that inherit another class.The function start at line 9 and ends at 15. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [9.0] and does not return any value. It declares 4.0 fu... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_packages_parameters | def test_packages_parameters(self, urls):api = Binstar()urls.register(method='GET', path='/packages/u1?platform=osx-64&package_type=conda&type=app', content='[]')api.user_packages('u1', platform='osx-64', type_='app', package_type='conda')urls.assertAllCalled() | 1 | 5 | 2 | 51 | 0 | 18 | 24 | 18 | self,urls | [] | None | {"Assign": 1, "Expr": 3} | 4 | 7 | 4 | ["Binstar", "urls.register", "api.user_packages", "urls.assertAllCalled"] | 0 | [] | The function (test_packages_parameters) defined within the public class called Test, that inherit another class.The function start at line 18 and ends at 24. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [18.0] and does not return any value. It declares 4.0 f... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_packages_empty | def test_packages_empty(self, urls):api = Binstar()urls.register(method='GET', path='/packages/u1', content='[]')packages = api.user_packages('u1')self.assertEqual(packages, [])urls.assertAllCalled() | 1 | 6 | 2 | 50 | 0 | 27 | 34 | 27 | self,urls | [] | None | {"Assign": 2, "Expr": 3} | 5 | 8 | 5 | ["Binstar", "urls.register", "api.user_packages", "self.assertEqual", "urls.assertAllCalled"] | 0 | [] | The function (test_packages_empty) defined within the public class called Test, that inherit another class.The function start at line 27 and ends at 34. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [27.0] and does not return any value. It declares 5.0 functi... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_register_public | def test_register_public(self, registry):r1 = registry.register(method='GET', path='/user', content='{"login": "eggs"}')r2 = registry.register(method='GET', path='/package/eggs/foo', status=404)r3 = registry.register(method='POST', path='/package/eggs/foo', status=200, content='{"login": "eggs"}')main(['--show-tracebac... | 1 | 10 | 2 | 114 | 0 | 17 | 29 | 17 | self,registry | [] | None | {"Assign": 4, "Expr": 5} | 10 | 13 | 10 | ["registry.register", "registry.register", "registry.register", "main", "data_dir", "r1.assertCalled", "r2.assertCalled", "r3.assertCalled", "json.loads", "self.assertTrue"] | 0 | [] | The function (test_register_public) defined within the public class called Test, that inherit another class.The function start at line 17 and ends at 29. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [17.0] and does not return any value. It declares 10.0 fun... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_register_private | def test_register_private(self, registry):r1 = registry.register(method='GET', path='/user', content='{"login": "eggs"}')r2 = registry.register(method='GET', path='/package/eggs/foo', status=404)r3 = registry.register(method='POST', path='/package/eggs/foo', status=200, content='{"login": "eggs"}')main(['--show-traceba... | 1 | 10 | 2 | 116 | 0 | 32 | 44 | 32 | self,registry | [] | None | {"Assign": 4, "Expr": 5} | 10 | 13 | 10 | ["registry.register", "registry.register", "registry.register", "main", "data_dir", "r1.assertCalled", "r2.assertCalled", "r3.assertCalled", "json.loads", "self.assertFalse"] | 0 | [] | The function (test_register_private) defined within the public class called Test, that inherit another class.The function start at line 32 and ends at 44. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [32.0] and does not return any value. It declares 10.0 fu... |
anaconda_anaconda-client | TestMultiPart | public | 0 | 1 | test_unicode_read | def test_unicode_read(self):body = io.BytesIO('Unicode™'.encode('utf-8'))multipart = requests_ext.MultiPartIO([body])self.assertEqual('Unicode™'.encode('utf-8'), multipart.read()) | 1 | 4 | 1 | 45 | 0 | 9 | 12 | 9 | self | [] | None | {"Assign": 2, "Expr": 1} | 6 | 4 | 6 | ["io.BytesIO", "encode", "requests_ext.MultiPartIO", "self.assertEqual", "encode", "multipart.read"] | 0 | [] | The function (test_unicode_read) defined within the public class called TestMultiPart, that inherit another class.The function start at line 9 and ends at 12. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 fun... |
anaconda_anaconda-client | TestGetSubdir | public | 0 | 1 | test_noarch | def test_noarch(self):index = {'subdir': 'noarch'}self.assertEqual(get_subdir(index), 'noarch')index = {'arch': None}self.assertEqual(get_subdir(index), 'noarch')index = {}self.assertEqual(get_subdir(index), 'noarch')index = {'arch': 'x86_64', 'platform': None, 'subdir': 'noarch'}self.assertEqual(get_subdir(index), 'no... | 1 | 9 | 1 | 82 | 0 | 7 | 18 | 7 | self | [] | None | {"Assign": 4, "Expr": 4} | 8 | 12 | 8 | ["self.assertEqual", "get_subdir", "self.assertEqual", "get_subdir", "self.assertEqual", "get_subdir", "self.assertEqual", "get_subdir"] | 0 | [] | The function (test_noarch) defined within the public class called TestGetSubdir, that inherit another class.The function start at line 7 and ends at 18. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 8.0 functions... |
anaconda_anaconda-client | TestGetSubdir | public | 0 | 1 | test_linux64 | def test_linux64(self):index = {'arch': 'x86_64', 'platform': 'linux'}self.assertEqual(get_subdir(index), 'linux-64') | 1 | 3 | 1 | 27 | 0 | 20 | 22 | 20 | self | [] | None | {"Assign": 1, "Expr": 1} | 2 | 3 | 2 | ["self.assertEqual", "get_subdir"] | 0 | [] | The function (test_linux64) defined within the public class called TestGetSubdir, that inherit another class.The function start at line 20 and ends at 22. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functio... |
anaconda_anaconda-client | TestGetSubdir | public | 0 | 1 | test_osx32 | def test_osx32(self):index = {'arch': 'x86', 'platform': 'osx'}self.assertEqual(get_subdir(index), 'osx-32') | 1 | 3 | 1 | 27 | 0 | 24 | 26 | 24 | self | [] | None | {"Assign": 1, "Expr": 1} | 2 | 3 | 2 | ["self.assertEqual", "get_subdir"] | 0 | [] | The function (test_osx32) defined within the public class called TestGetSubdir, that inherit another class.The function start at line 24 and ends at 26. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions... |
anaconda_anaconda-client | TestGetSubdir | public | 0 | 1 | test_ppc64 | def test_ppc64(self):index = {'arch': 'ppc64le', 'platform': 'linux'}self.assertEqual(get_subdir(index), 'linux-ppc64le')index = {'subdir': 'linux-ppc64le'}self.assertEqual(get_subdir(index), 'linux-ppc64le') | 1 | 5 | 1 | 45 | 0 | 28 | 33 | 28 | self | [] | None | {"Assign": 2, "Expr": 2} | 4 | 6 | 4 | ["self.assertEqual", "get_subdir", "self.assertEqual", "get_subdir"] | 0 | [] | The function (test_ppc64) defined within the public class called TestGetSubdir, that inherit another class.The function start at line 28 and ends at 33. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 functions... |
anaconda_anaconda-client | TestUpdate | public | 0 | 1 | test_update_package_from_json | def test_update_package_from_json(self, urls):urls.register(method='HEAD', path='/', status=200)update = urls.register(method='PATCH', path='/package/owner/package_name', content=json_test_data, status=200)main(['update', 'owner/package_name', data_dir('metadata.json')])urls.assertAllCalled()req = json.loads(update.req... | 1 | 7 | 2 | 83 | 0 | 30 | 37 | 30 | self,urls | [] | None | {"Assign": 2, "Expr": 4} | 7 | 8 | 7 | ["urls.register", "urls.register", "main", "data_dir", "urls.assertAllCalled", "json.loads", "self.assertEqual"] | 0 | [] | The function (test_update_package_from_json) defined within the public class called TestUpdate, that inherit another class.The function start at line 30 and ends at 37. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [30.0] and does not return any value. It dec... |
anaconda_anaconda-client | TestUpdate | public | 0 | 1 | test_update_package_from_file | def test_update_package_from_file(self, urls):urls.register(method='HEAD', path='/', status=200)update = urls.register(method='PATCH', path='/package/owner/package_name', content=package_test_data, status=200)main(['update', 'owner/package_name', data_dir('test_package34-0.3.1.tar.gz')])urls.assertAllCalled()req = json... | 1 | 9 | 2 | 83 | 0 | 40 | 49 | 40 | self,urls | [] | None | {"Assign": 2, "Expr": 4} | 7 | 10 | 7 | ["urls.register", "urls.register", "main", "data_dir", "urls.assertAllCalled", "json.loads", "self.assertEqual"] | 0 | [] | The function (test_update_package_from_file) defined within the public class called TestUpdate, that inherit another class.The function start at line 40 and ends at 49. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [40.0] and does not return any value. It dec... |
anaconda_anaconda-client | TestUpdate | public | 0 | 1 | test_update_release_from_json | def test_update_release_from_json(self, urls):urls.register(method='HEAD', path='/', status=200)update = urls.register(method='PATCH', path='/release/owner/package_name/1.0.0', content=json_test_data, status=200)main(['update', 'owner/package_name/1.0.0', data_dir('metadata.json'), '--release'])urls.assertAllCalled()re... | 1 | 9 | 2 | 85 | 0 | 52 | 61 | 52 | self,urls | [] | None | {"Assign": 2, "Expr": 4} | 7 | 10 | 7 | ["urls.register", "urls.register", "main", "data_dir", "urls.assertAllCalled", "json.loads", "self.assertEqual"] | 0 | [] | The function (test_update_release_from_json) defined within the public class called TestUpdate, that inherit another class.The function start at line 52 and ends at 61. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [52.0] and does not return any value. It dec... |
anaconda_anaconda-client | TestUpdate | public | 0 | 1 | test_update_release_from_file | def test_update_release_from_file(self, urls):urls.register(method='HEAD', path='/', status=200)update = urls.register(method='PATCH', path='/release/owner/package_name/1.0.0', content=release_test_data, status=200)main(['update', 'owner/package_name/1.0.0', data_dir('test_package34-0.3.1.tar.gz'), '--release'])urls.as... | 1 | 9 | 2 | 85 | 0 | 64 | 73 | 64 | self,urls | [] | None | {"Assign": 2, "Expr": 4} | 7 | 10 | 7 | ["urls.register", "urls.register", "main", "data_dir", "urls.assertAllCalled", "json.loads", "self.assertEqual"] | 0 | [] | The function (test_update_release_from_file) defined within the public class called TestUpdate, that inherit another class.The function start at line 64 and ends at 73. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [64.0] and does not return any value. It dec... |
anaconda_anaconda-client | TestUpdate | public | 0 | 1 | test_update_local_file_not_found | def test_update_local_file_not_found(self, urls):urls.register(method='HEAD', path='/', status=200)urls.register(method='PATCH', path='/package/owner/package_name', content=package_test_data, status=404)with self.assertRaises(SystemExit):main(['update', 'owner/package_name', data_dir('not_existing.tar.gz')]) | 1 | 5 | 2 | 64 | 0 | 76 | 81 | 76 | self,urls | [] | None | {"Expr": 3, "With": 1} | 5 | 6 | 5 | ["urls.register", "urls.register", "self.assertRaises", "main", "data_dir"] | 0 | [] | The function (test_update_local_file_not_found) defined within the public class called TestUpdate, that inherit another class.The function start at line 76 and ends at 81. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [76.0] and does not return any value. It ... |
anaconda_anaconda-client | TestUpdate | public | 0 | 1 | test_update_package_not_found | def test_update_package_not_found(self, urls):urls.register(method='HEAD', path='/', status=200)urls.register(method='PATCH', path='/package/owner/package_name', content=package_test_data, status=404)with self.assertRaises(errors.NotFound):main(['update', 'owner/package_name', data_dir('test_package34-0.3.1.tar.gz')]) | 1 | 5 | 2 | 66 | 0 | 84 | 89 | 84 | self,urls | [] | None | {"Expr": 3, "With": 1} | 5 | 6 | 5 | ["urls.register", "urls.register", "self.assertRaises", "main", "data_dir"] | 0 | [] | The function (test_update_package_not_found) defined within the public class called TestUpdate, that inherit another class.The function start at line 84 and ends at 89. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [84.0] and does not return any value. It dec... |
anaconda_anaconda-client | TestUpdate | public | 0 | 1 | test_update_release_missing_version | def test_update_release_missing_version(self, urls):urls.register(method='HEAD', path='/', status=200)urls.register(method='PATCH', path='/release/owner/package_name/1.0.0', content=package_test_data, status=200)with self.assertRaises(errors.UserError):main(['update', 'owner/package_name', data_dir('test_package34-0.3.... | 1 | 5 | 2 | 68 | 0 | 92 | 96 | 92 | self,urls | [] | None | {"Expr": 3, "With": 1} | 5 | 5 | 5 | ["urls.register", "urls.register", "self.assertRaises", "main", "data_dir"] | 0 | [] | The function (test_update_release_missing_version) defined within the public class called TestUpdate, that inherit another class.The function start at line 92 and ends at 96. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [92.0] and does not return any value. ... |
anaconda_anaconda-client | TestUpdate | public | 0 | 1 | test_update_release_not_found | def test_update_release_not_found(self, urls):urls.register(method='HEAD', path='/', status=200)urls.register(method='PATCH', path='/release/owner/package_name/1.0.0', content=package_test_data, status=404)with self.assertRaises(errors.NotFound):main(['update', 'owner/package_name/1.0.0', data_dir('test_package34-0.3.1... | 1 | 5 | 2 | 68 | 0 | 99 | 104 | 99 | self,urls | [] | None | {"Expr": 3, "With": 1} | 5 | 6 | 5 | ["urls.register", "urls.register", "self.assertRaises", "main", "data_dir"] | 0 | [] | The function (test_update_release_not_found) defined within the public class called TestUpdate, that inherit another class.The function start at line 99 and ends at 104. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [99.0] and does not return any value. It de... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_upload_bad_package | def test_upload_bad_package(self, registry):registry.register(method='HEAD', path='/', status=200)registry.register(method='GET', path='/user', content='{"login": "eggs"}')registry.register(method='GET', path='/package/eggs/foo', content='{}', status=404)registry.register(method='POST', path='/package/eggs/foo', conten... | 1 | 16 | 2 | 223 | 0 | 19 | 36 | 19 | self,registry | [] | None | {"Assign": 1, "Expr": 10} | 14 | 18 | 14 | ["registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "main", "data_dir", "self.assertIsNotNone", "get", "json.loads"] | 0 | [] | The function (test_upload_bad_package) defined within the public class called Test, that inherit another class.The function start at line 19 and ends at 36. It contains 16 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [19.0] and does not return any value. It declares 14.0 ... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_upload_bad_package_no_register | def test_upload_bad_package_no_register(self, registry):registry.register(method='HEAD', path='/', status=200)registry.register(method='GET', path='/user', content='{"login": "eggs"}')registry.register(method='GET', path='/dist/eggs/foo/0.1/osx-64/foo-0.1-0.tar.bz2', status=404)registry.register(method='GET', path='/pa... | 1 | 8 | 2 | 101 | 0 | 39 | 48 | 39 | self,registry | [] | None | {"Expr": 6, "With": 1} | 8 | 10 | 8 | ["registry.register", "registry.register", "registry.register", "registry.register", "self.assertRaises", "main", "data_dir", "registry.assertAllCalled"] | 0 | [] | The function (test_upload_bad_package_no_register) defined within the public class called Test, that inherit another class.The function start at line 39 and ends at 48. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [39.0] and does not return any value. It dec... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_upload_conda | def test_upload_conda(self, registry):registry.register(method='HEAD', path='/', status=200)registry.register(method='GET', path='/user', content='{"login": "eggs"}')registry.register(method='GET', path='/dist/eggs/foo/0.1/osx-64/foo-0.1-0.tar.bz2', status=404)registry.register(method='GET', path='/package/eggs/foo', c... | 1 | 16 | 2 | 200 | 0 | 51 | 68 | 51 | self,registry | [] | None | {"Assign": 1, "Expr": 10} | 14 | 18 | 14 | ["registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "main", "data_dir", "registry.assertAllCalled", "self.assertIsNotNone", "get", "json.loads"] | 0 | [] | The function (test_upload_conda) defined within the public class called Test, that inherit another class.The function start at line 51 and ends at 68. It contains 16 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [51.0] and does not return any value. It declares 14.0 functi... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_upload_conda_v2 | def test_upload_conda_v2(self, registry):registry.register(method='HEAD', path='/', status=200)registry.register(method='GET', path='/user', content='{"login": "eggs"}')registry.register(method='GET', path='/dist/eggs/mock/2.0.0/osx-64/mock-2.0.0-py37_1000.conda', status=404)registry.register(method='GET', path='/packa... | 1 | 21 | 2 | 201 | 0 | 71 | 93 | 71 | self,registry | [] | None | {"Assign": 1, "Expr": 10} | 14 | 23 | 14 | ["registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "main", "data_dir", "registry.assertAllCalled", "self.assertIsNotNone", "get", "json.loads"] | 0 | [] | The function (test_upload_conda_v2) defined within the public class called Test, that inherit another class.The function start at line 71 and ends at 93. It contains 21 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [71.0] and does not return any value. It declares 14.0 fun... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_upload_use_pkg_metadata | def test_upload_use_pkg_metadata(self, registry):registry.register(method='HEAD', path='/', status=200)registry.register(method='GET', path='/user', content='{"login": "eggs"}')registry.register(method='GET', path='/dist/eggs/mock/2.0.0/osx-64/mock-2.0.0-py37_1000.conda', status=404)registry.register(method='GET', path... | 1 | 22 | 2 | 219 | 0 | 96 | 119 | 96 | self,registry | [] | None | {"Assign": 1, "Expr": 11} | 15 | 24 | 15 | ["registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "main", "data_dir", "registry.assertAllCalled", "self.assertIsNotNone", "get", "json.loads"] | 0 | [] | The function (test_upload_use_pkg_metadata) defined within the public class called Test, that inherit another class.The function start at line 96 and ends at 119. It contains 22 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [96.0] and does not return any value. It declares... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_upload_pypi | def test_upload_pypi(self, registry):registry.register(method='HEAD', path='/', status=200)registry.register(method='GET', path='/user', content='{"login": "eggs"}')registry.register(method='GET', path='/dist/eggs/test-package34/0.3.1/test_package34-0.3.1.tar.gz', status=404)registry.register(method='GET', path='/packa... | 1 | 21 | 2 | 201 | 0 | 122 | 144 | 122 | self,registry | [] | None | {"Assign": 1, "Expr": 10} | 14 | 23 | 14 | ["registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "main", "data_dir", "registry.assertAllCalled", "self.assertIsNotNone", "get", "json.loads"] | 0 | [] | The function (test_upload_pypi) defined within the public class called Test, that inherit another class.The function start at line 122 and ends at 144. It contains 21 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [122.0] and does not return any value. It declares 14.0 func... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_upload_pypi_with_conda_package_name_allowed | def test_upload_pypi_with_conda_package_name_allowed(self, registry):registry.register(method='HEAD', path='/', status=200)registry.register(method='GET', path='/user', content='{"login": "eggs"}')registry.register(method='GET', path='/dist/eggs/test_package34/0.3.1/test_package34-0.3.1.tar.gz', status=404)registry.reg... | 1 | 31 | 2 | 210 | 0 | 147 | 179 | 147 | self,registry | [] | None | {"Assign": 1, "Expr": 10} | 14 | 33 | 14 | ["registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "main", "data_dir", "registry.assertAllCalled", "self.assertIsNotNone", "get", "json.loads"] | 0 | [] | The function (test_upload_pypi_with_conda_package_name_allowed) defined within the public class called Test, that inherit another class.The function start at line 147 and ends at 179. It contains 31 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [147.0] and does not return ... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_upload_conda_package_with_name_override_fails | def test_upload_conda_package_with_name_override_fails(self, registry):registry.register(method='HEAD', path='/', status=200)registry.register(method='GET', path='/user', content='{"login": "eggs"}')# Passing -o for `file` package_type doesn't override channelwith self.assertRaises(errors.BinstarError):main(['--show-tr... | 1 | 16 | 2 | 76 | 0 | 182 | 200 | 182 | self,registry | [] | None | {"Expr": 4, "With": 1} | 6 | 19 | 6 | ["registry.register", "registry.register", "self.assertRaises", "main", "data_dir", "registry.assertAllCalled"] | 0 | [] | The function (test_upload_conda_package_with_name_override_fails) defined within the public class called Test, that inherit another class.The function start at line 182 and ends at 200. It contains 16 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [182.0] and does not retur... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_upload_pypi_with_random_name | def test_upload_pypi_with_random_name(self, registry):registry.register(method='HEAD', path='/', status=200)registry.register(method='GET', path='/user', content='{"login": "eggs"}')with self.assertRaises(errors.BinstarError):main(['--show-traceback', 'upload', '--package', 'alpha_omega', data_dir('test_package34-0.3.1... | 1 | 6 | 2 | 71 | 0 | 203 | 210 | 203 | self,registry | [] | None | {"Expr": 4, "With": 1} | 6 | 8 | 6 | ["registry.register", "registry.register", "self.assertRaises", "main", "data_dir", "registry.assertAllCalled"] | 0 | [] | The function (test_upload_pypi_with_random_name) defined within the public class called Test, that inherit another class.The function start at line 203 and ends at 210. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [203.0] and does not return any value. It de... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_upload_file | def test_upload_file(self, registry):registry.register(method='HEAD', path='/', status=200)registry.register(method='GET', path='/user', content='{"login": "eggs"}')registry.register(method='GET', path='/dist/eggs/test-package34/0.3.1/test_package34-0.3.1.tar.gz', status=404)registry.register(method='GET', path='/packa... | 1 | 33 | 2 | 214 | 0 | 213 | 247 | 213 | self,registry | [] | None | {"Assign": 1, "Expr": 10} | 14 | 35 | 14 | ["registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "main", "data_dir", "registry.assertAllCalled", "self.assertIsNotNone", "get", "json.loads"] | 0 | [] | The function (test_upload_file) defined within the public class called Test, that inherit another class.The function start at line 213 and ends at 247. It contains 33 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [213.0] and does not return any value. It declares 14.0 func... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_upload_interactive_no_overwrite | def test_upload_interactive_no_overwrite(self, registry, bool_input):# regression test for #364registry.register(method='HEAD', path='/', status=200)registry.register(method='GET', path='/user', content='{"login": "eggs"}')registry.register(method='GET', path='/dist/eggs/foo/0.1/osx-64/foo-0.1-0.tar.bz2', content='{}')... | 1 | 7 | 3 | 82 | 0 | 251 | 261 | 251 | self,registry,bool_input | [] | None | {"Assign": 1, "Expr": 5} | 7 | 11 | 7 | ["registry.register", "registry.register", "registry.register", "main", "data_dir", "registry.assertAllCalled", "unittest.mock.patch"] | 0 | [] | The function (test_upload_interactive_no_overwrite) defined within the public class called Test, that inherit another class.The function start at line 251 and ends at 261. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [251.0] and does not return any value. It... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_upload_interactive_overwrite | def test_upload_interactive_overwrite(self, registry, bool_input):registry.register(method='HEAD', path='/', status=200)registry.register(method='GET', path='/user', content='{"login": "eggs"}')registry.register(method='GET', path='/dist/eggs/foo/0.1/osx-64/foo-0.1-0.tar.bz2', content='{}')registry.register(method='DEL... | 1 | 18 | 3 | 225 | 0 | 265 | 285 | 265 | self,registry,bool_input | [] | None | {"Assign": 2, "Expr": 11} | 16 | 21 | 16 | ["registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "main", "data_dir", "registry.assertAllCalled", "self.assertIsNotNone", "get", "json.loads", "unittest.mock.patch"] | 0 | [] | The function (test_upload_interactive_overwrite) defined within the public class called Test, that inherit another class.The function start at line 265 and ends at 285. It contains 18 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [265.0] and does not return any value. It d... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_upload_private_package | def test_upload_private_package(self, registry):registry.register(method='HEAD', path='/', status=200)registry.register(method='GET', path='/user', content='{"login": "eggs"}')registry.register(method='GET', path='/dist/eggs/foo/0.1/osx-64/foo-0.1-0.tar.bz2', status=404)registry.register(method='GET', path='/package/eg... | 1 | 17 | 2 | 226 | 0 | 288 | 306 | 288 | self,registry | [] | None | {"Assign": 1, "Expr": 11} | 15 | 19 | 15 | ["registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "main", "data_dir", "registry.assertAllCalled", "self.assertIsNotNone", "get", "json.loads"] | 0 | [] | The function (test_upload_private_package) defined within the public class called Test, that inherit another class.The function start at line 288 and ends at 306. It contains 17 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [288.0] and does not return any value. It declare... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_upload_private_package_not_allowed | def test_upload_private_package_not_allowed(self, registry):registry.register(method='HEAD', path='/', status=200)registry.register(method='GET', path='/user', content='{"login": "eggs"}')registry.register(method='GET', path='/dist/eggs/foo/0.1/osx-64/foo-0.1-0.tar.bz2', status=404)registry.register(method='GET', path=... | 1 | 13 | 2 | 121 | 0 | 309 | 322 | 309 | self,registry | [] | None | {"Expr": 6, "With": 1} | 8 | 14 | 8 | ["registry.register", "registry.register", "registry.register", "registry.register", "registry.register", "self.assertRaises", "main", "data_dir"] | 0 | [] | The function (test_upload_private_package_not_allowed) defined within the public class called Test, that inherit another class.The function start at line 309 and ends at 322. It contains 13 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [309.0] and does not return any value... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_whoami_anon | def test_whoami_anon(self, urls):user = urls.register(method='GET', path='/user', status=401)main(['--show-traceback', 'whoami'])self.assertIn('Anonymous User', self.stream.getvalue())user.assertCalled() | 1 | 5 | 2 | 52 | 0 | 19 | 24 | 19 | self,urls | [] | None | {"Assign": 1, "Expr": 3} | 5 | 6 | 5 | ["urls.register", "main", "self.assertIn", "self.stream.getvalue", "user.assertCalled"] | 0 | [] | The function (test_whoami_anon) defined within the public class called Test, that inherit another class.The function start at line 19 and ends at 24. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [19.0] and does not return any value. It declares 5.0 functions... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_whoami | def test_whoami(self, urls):content = json.dumps({'login': 'eggs', 'created_at': '1/2/2000'})user = urls.register(method='GET', path='/user', content=content)main(['--show-traceback', 'whoami'])self.assertIn('eggs', self.stream.getvalue())user.assertCalled() | 1 | 6 | 2 | 68 | 0 | 27 | 34 | 27 | self,urls | [] | None | {"Assign": 2, "Expr": 3} | 6 | 8 | 6 | ["json.dumps", "urls.register", "main", "self.assertIn", "self.stream.getvalue", "user.assertCalled"] | 0 | [] | The function (test_whoami) defined within the public class called Test, that inherit another class.The function start at line 27 and ends at 34. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [27.0] and does not return any value. It declares 6.0 functions, and... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_netrc_ignored | def test_netrc_ignored(self, urls):# Disable token authenticationself.load_token.return_value = Noneos.environ.pop('BINSTAR_API_TOKEN', None)os.environ.pop('ANACONDA_API_TOKEN', None)# requests.get_netrc_auth uses expanduser to find the netrc file, point to our test fileexpanduser = unittest.mock.Mock(return_value=data... | 1 | 12 | 2 | 122 | 0 | 37 | 55 | 37 | self,urls | [] | None | {"Assign": 4, "Expr": 6, "With": 1} | 11 | 19 | 11 | ["os.environ.pop", "os.environ.pop", "unittest.mock.Mock", "data_dir", "unittest.mock.patch", "requests.utils.get_netrc_auth", "self.assertEqual", "urls.register", "main", "user.assertNotCalled", "self.assertIsNone"] | 0 | [] | The function (test_netrc_ignored) defined within the public class called Test, that inherit another class.The function start at line 37 and ends at 55. It contains 12 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [37.0] and does not return any value. It declares 11.0 funct... |
anaconda_anaconda-client | Responses | public | 0 | 0 | __init__ | def __init__(self):self._resps = [] | 1 | 2 | 1 | 11 | 0 | 21 | 22 | 21 | self | [] | None | {"Assign": 1} | 0 | 2 | 0 | [] | 14,667 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.AllocationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ContentError.__init__", "_... | The function (__init__) defined within the public class called Responses.The function start at line 21 and ends at 22. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 14667.0 functions calling this function which are ["... |
anaconda_anaconda-client | Responses | public | 0 | 0 | append | def append(self, res):self._resps.append(res) | 1 | 2 | 2 | 15 | 0 | 24 | 25 | 24 | self,res | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self._resps.append"] | 1,484 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.bot_py.Bobbit.update_user_channel", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.history_py.History.insert", "_.content.gdrive.MyDrive.Phd_Thesis.Data... | The function (append) defined within the public class called Responses.The function start at line 24 and ends at 25. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [24.0] and does not return any value. It declare 1.0 function, It has 1.0 function called inside... |
anaconda_anaconda-client | Responses | public | 0 | 0 | called | def called(self):return len(self._resps) | 1 | 2 | 1 | 12 | 0 | 28 | 29 | 28 | self | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["len"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77620428_lqhuang_mode_ng.tests.unit.test_services_py.test_Service.test_transition_with"] | The function (called) defined within the public class called Responses.The function start at line 28 and ends at 29. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function called insid... |
anaconda_anaconda-client | Responses | public | 0 | 0 | req | def req(self):if self._resps:return self._resps[0][1] | 2 | 3 | 1 | 20 | 0 | 32 | 34 | 32 | self | [] | Returns | {"If": 1, "Return": 1} | 0 | 3 | 0 | [] | 0 | [] | The function (req) defined within the public class called Responses.The function start at line 32 and ends at 34. It contains 3 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value.. |
anaconda_anaconda-client | Responses | public | 0 | 0 | assertCalled | def assertCalled(self, url=''):assert self.called, 'The url %s was not called' % url# nosec | 1 | 2 | 2 | 17 | 0 | 36 | 37 | 36 | self,url | [] | None | {} | 0 | 2 | 0 | [] | 0 | [] | The function (assertCalled) defined within the public class called Responses.The function start at line 36 and ends at 37. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [36.0] and does not return any value.. |
anaconda_anaconda-client | Responses | public | 0 | 0 | assertNotCalled | def assertNotCalled(self, url=''):assert not self.called, 'The url %s was called' % url# nosec | 1 | 2 | 2 | 18 | 0 | 39 | 40 | 39 | self,url | [] | None | {} | 0 | 2 | 0 | [] | 0 | [] | The function (assertNotCalled) defined within the public class called Responses.The function start at line 39 and ends at 40. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [39.0] and does not return any value.. |
anaconda_anaconda-client | Responses | public | 0 | 0 | __init__ | def __init__(self):self._resps = [] | 1 | 2 | 1 | 11 | 0 | 44 | 45 | 21 | self | [] | None | {"Assign": 1} | 0 | 2 | 0 | [] | 14,667 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.AllocationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ContentError.__init__", "_... | The function (__init__) defined within the public class called Responses.The function start at line 44 and ends at 45. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 14667.0 functions calling this function which are ["... |
anaconda_anaconda-client | Registry | public | 0 | 0 | __enter__ | def __enter__(self):self.real_send = requests.Session.sendrequests.Session.send = self.mock_sendreturn self | 1 | 4 | 1 | 25 | 0 | 47 | 51 | 47 | self | [] | Returns | {"Assign": 2, "Return": 1} | 0 | 5 | 0 | [] | 35 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3928915_donnemartin_gitsome.xonsh.contexts_py.Functor.__enter__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3967063_matthew_brett_delocate.delocate.tmpdirs_py.InTemporaryDirectory.__enter__", "_.content.gdrive.M... | The function (__enter__) defined within the public class called Registry.The function start at line 47 and ends at 51. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It has 35.0 functions calling this function which are [... |
anaconda_anaconda-client | Registry | public | 0 | 0 | __exit__ | def __exit__(self, *exec_info):requests.Session.send = self.real_send | 1 | 2 | 2 | 17 | 0 | 53 | 54 | 53 | self,*exec_info | [] | None | {"Assign": 1} | 0 | 2 | 0 | [] | 32 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3967063_matthew_brett_delocate.delocate.tmpdirs_py.InTemporaryDirectory.__exit__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3967063_matthew_brett_delocate.delocate.wheeltools_py.InWheel.__exit__", "_.content.gd... | The function (__exit__) defined within the public class called Registry.The function start at line 53 and ends at 54. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [53.0] and does not return any value. It has 32.0 functions calling this function which are ["_... |
anaconda_anaconda-client | Registry | public | 0 | 0 | filter_request | def filter_request(rule, prepared_request):if rule.url and rule.url != prepared_request.url:return Falseif rule.path and rule.path != prepared_request.path_url:return Falseif rule.method and rule.method != prepared_request.method:return Falsereturn True | 7 | 8 | 2 | 54 | 0 | 57 | 67 | 57 | rule,prepared_request | [] | Returns | {"If": 3, "Return": 4} | 0 | 11 | 0 | [] | 0 | [] | The function (filter_request) defined within the public class called Registry.The function start at line 57 and ends at 67. It contains 8 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [57.0], and this function return a value.. |
anaconda_anaconda-client | Registry | public | 0 | 0 | find_rule | def find_rule(self, prepared_request):return next((stored_rule for stored_rule in self._map[::-1] if self.filter_request(stored_rule, prepared_request)), None) | 3 | 4 | 2 | 36 | 0 | 69 | 72 | 69 | self,prepared_request | [] | Returns | {"Return": 1} | 2 | 4 | 2 | ["next", "self.filter_request"] | 0 | [] | The function (find_rule) defined within the public class called Registry.The function start at line 69 and ends at 72. It contains 4 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [69.0], and this function return a value. It declares 2.0 functions, and It has 2.0 functions... |
anaconda_anaconda-client | Registry | public | 0 | 0 | mock_send | def mock_send(self, prepared_request, *args, **kwargs):rule = self.find_rule(prepared_request)if rule is None:raise Exception('No matching rule found for url [%s] %s' % (prepared_request.method, prepared_request.url),)if rule.expected_headers:for header, value in rule.expected_headers.items():if header not in prepared_... | 10 | 37 | 4 | 231 | 0 | 74 | 117 | 74 | self,prepared_request,*args,**kwargs | [] | Returns | {"Assign": 10, "Expr": 3, "For": 1, "If": 7, "Return": 1} | 15 | 44 | 15 | ["self.find_rule", "Exception", "rule.expected_headers.items", "Exception", "format", "Exception", "format", "isinstance", "json.dumps", "isinstance", "content.encode", "requests.models.Response", "res.headers.update", "rule.res.append", "rule.side_effect"] | 0 | [] | The function (mock_send) defined within the public class called Registry.The function start at line 74 and ends at 117. It contains 37 lines of code and it has a cyclomatic complexity of 10. It takes 4 parameters, represented as [74.0], and this function return a value. It declares 15.0 functions, and It has 15.0 func... |
anaconda_anaconda-client | Registry | public | 0 | 0 | register | def register(self,url=None,path=None,method='GET',status=200,content=b'',side_effect=None,headers=None,expected_headers=None,):res = Responses()self._map.append(Rule(url, path, method, status, content, side_effect, res, headers, expected_headers))return res | 1 | 14 | 9 | 73 | 0 | 119 | 132 | 119 | self,url,path,method,status,content,side_effect,headers,expected_headers | [] | Returns | {"Assign": 1, "Expr": 1, "Return": 1} | 3 | 14 | 3 | ["Responses", "self._map.append", "Rule"] | 299 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3576232_vmware_liota.liota.dccs.aws_iot_py.AWSIoT.register", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3576232_vmware_liota.packages.examples.kura.kura_integrate_iotcc_py.sub_callback", "_.content.gdrive.MyDrive... | The function (register) defined within the public class called Registry.The function start at line 119 and ends at 132. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 9 parameters, represented as [119.0], and this function return a value. It declares 3.0 functions, It has 3.0 functions c... |
anaconda_anaconda-client | Registry | public | 0 | 0 | unregister | def unregister(self, res):for item in list(self._map):if res == item.res:self._map.remove(item)return | 3 | 5 | 2 | 33 | 0 | 134 | 138 | 134 | self,res | [] | None | {"Expr": 1, "For": 1, "If": 1, "Return": 1} | 2 | 5 | 2 | ["list", "self._map.remove"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94562214_home_assistant_core.homeassistant.components.bluetooth.manager_py.HomeAssistantBluetoothManager._async_unregister_scanner", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95420343_datalad_datalad_next.datala... | The function (unregister) defined within the public class called Registry.The function start at line 134 and ends at 138. It contains 5 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [134.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions call... |
anaconda_anaconda-client | Registry | public | 0 | 0 | assertAllCalled | def assertAllCalled(self):for item in self._map:res = item.resres.assertCalled('[%s] %s%s' % (item.method or 'any', item.url or 'http://<any>', item.path)) | 4 | 4 | 1 | 41 | 0 | 140 | 143 | 140 | self | [] | None | {"Assign": 1, "Expr": 1, "For": 1} | 1 | 4 | 1 | ["res.assertCalled"] | 0 | [] | The function (assertAllCalled) defined within the public class called Registry.The function start at line 140 and ends at 143. It contains 4 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function c... |
anaconda_anaconda-client | public | public | 0 | 0 | urlpatch.inner | def inner(self, *args, **kwargs):with Registry() as registry:return func(self, registry, *args, **kwargs) | 1 | 3 | 3 | 31 | 0 | 148 | 150 | 148 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (urlpatch.inner) defined within the public class called public.The function start at line 148 and ends at 150. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [148.0] and does not return any value.. |
anaconda_anaconda-client | public | public | 0 | 0 | urlpatch | def urlpatch(func):@wraps(func)def inner(self, *args, **kwargs):with Registry() as registry:return func(self, registry, *args, **kwargs)return inner | 1 | 4 | 1 | 14 | 0 | 146 | 152 | 146 | func | [] | Returns | {"Return": 2, "With": 1} | 3 | 7 | 3 | ["Registry", "func", "wraps"] | 0 | [] | The function (urlpatch) defined within the public class called public.The function start at line 146 and ends at 152. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 3.0 functions, and It has 3.0 functions cal... |
anaconda_anaconda-client | public | public | 0 | 0 | data_dir | def data_dir(path):return str(HERE / 'data' / path) | 1 | 2 | 1 | 14 | 0 | 15 | 16 | 15 | path | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["str"] | 45 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.tests.inspect_package.test_conda_py.Test.test_conda", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.tests.inspect_package.test_conda_py.Test.test_c... | The function (data_dir) defined within the public class called public.The function start at line 15 and ends at 16. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function called inside... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_conda_old | def test_conda_old(self):filename = data_dir('conda_gc_test-1.2.1-py27_3.tar.bz2')package_data, version_data, file_data = conda.inspect_conda_package(filename)self.assertEqual(expected_package_data, package_data)self.assertEqual(expected_version_data_121, version_data)self.assertEqual(expected_file_data_121, file_data) | 1 | 6 | 1 | 47 | 0 | 167 | 173 | 167 | self | [] | None | {"Assign": 2, "Expr": 3} | 5 | 7 | 5 | ["data_dir", "conda.inspect_conda_package", "self.assertEqual", "self.assertEqual", "self.assertEqual"] | 0 | [] | The function (test_conda_old) defined within the public class called Test, that inherit another class.The function start at line 167 and ends at 173. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, a... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_conda | def test_conda(self):filename = data_dir('conda_gc_test-2.2.1-py27_3.tar.bz2')package_data, version_data, file_data = conda.inspect_conda_package(filename)self.assertEqual(expected_package_data, package_data)self.assertEqual(expected_version_data_221, version_data)self.assertEqual(expected_file_data_221, file_data) | 1 | 6 | 1 | 47 | 0 | 175 | 181 | 175 | self | [] | None | {"Assign": 2, "Expr": 3} | 5 | 7 | 5 | ["data_dir", "conda.inspect_conda_package", "self.assertEqual", "self.assertEqual", "self.assertEqual"] | 0 | [] | The function (test_conda) defined within the public class called Test, that inherit another class.The function start at line 175 and ends at 181. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, and ... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_conda_app_image | def test_conda_app_image(self):filename = data_dir('test-app-package-icon-0.1-0.tar.bz2')package_data, version_data, _ = conda.inspect_conda_package(filename)self.assertEqual(app_expected_package_data, package_data)self.assertEqual(app_expected_version_data.pop('icon'), version_data.pop('icon'))self.assertEqual(app_exp... | 1 | 6 | 1 | 57 | 0 | 183 | 189 | 183 | self | [] | None | {"Assign": 2, "Expr": 3} | 7 | 7 | 7 | ["data_dir", "conda.inspect_conda_package", "self.assertEqual", "self.assertEqual", "app_expected_version_data.pop", "version_data.pop", "self.assertEqual"] | 0 | [] | The function (test_conda_app_image) defined within the public class called Test, that inherit another class.The function start at line 183 and ends at 189. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 7.0 functi... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_conda_v2_format | def test_conda_v2_format(self):filename = data_dir('conda_gc_test-2.2.1-py27_3.conda')package_data, version_data, file_data = conda.inspect_conda_package(filename)self.assertEqual(expected_package_data, package_data)self.assertEqual(expected_version_data_221, version_data)self.assertEqual(expected_file_data_221_conda, ... | 1 | 6 | 1 | 47 | 0 | 191 | 197 | 191 | self | [] | None | {"Assign": 2, "Expr": 3} | 5 | 7 | 5 | ["data_dir", "conda.inspect_conda_package", "self.assertEqual", "self.assertEqual", "self.assertEqual"] | 0 | [] | The function (test_conda_v2_format) defined within the public class called Test, that inherit another class.The function start at line 191 and ends at 197. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functi... |
anaconda_anaconda-client | EnvInspectorTestCase | public | 0 | 1 | test_package_name | def test_package_name(self):with open(data_dir('environment.yml')) as fileobj:assert EnvInspector('environment.yml', fileobj).name == 'stats'# nosec | 1 | 3 | 1 | 27 | 0 | 8 | 10 | 8 | self | [] | None | {"With": 1} | 3 | 3 | 3 | ["open", "data_dir", "EnvInspector"] | 0 | [] | The function (test_package_name) defined within the public class called EnvInspectorTestCase, that inherit another class.The function start at line 8 and ends at 10. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares ... |
anaconda_anaconda-client | EnvInspectorTestCase | public | 0 | 1 | test_version | def test_version(self):with open(data_dir('environment.yml')) as fileobj:self.assertIsInstance(EnvInspector('environment.yml', fileobj).version, str) | 1 | 3 | 1 | 31 | 0 | 12 | 14 | 12 | self | [] | None | {"Expr": 1, "With": 1} | 4 | 3 | 4 | ["open", "data_dir", "self.assertIsInstance", "EnvInspector"] | 0 | [] | The function (test_version) defined within the public class called EnvInspectorTestCase, that inherit another class.The function start at line 12 and ends at 14. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 ... |
anaconda_anaconda-client | InspectEnvironmentPackageTest | public | 0 | 1 | test_inspect_env_package | def test_inspect_env_package(self):with open(data_dir('environment.yml')) as fileobj:package_data, release_data, file_data = inspect_env_package('environment.yml', fileobj)self.assertEqual({'name': 'stats', 'summary': 'Environment file'}, package_data)self.assertEqual({'basename': 'environment.yml', 'attrs': {}}, file_... | 1 | 5 | 1 | 61 | 0 | 18 | 24 | 18 | self | [] | None | {"Assign": 1, "Expr": 2, "With": 1} | 5 | 7 | 5 | ["open", "data_dir", "inspect_env_package", "self.assertEqual", "self.assertEqual"] | 0 | [] | The function (test_inspect_env_package) defined within the public class called InspectEnvironmentPackageTest, that inherit another class.The function start at line 18 and ends at 24. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any va... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_sdist | def test_sdist(self):filename = data_dir('test_package34-0.3.1.tar.gz')with open(filename, 'rb') as file:package_data, version_data, file_data = pypi.inspect_pypi_package(filename, file)expected_file_data = {'attrs': {'packagetype': 'sdist', 'python_version': 'source'},'basename': 'test_package34-0.3.1.tar.gz','depende... | 2 | 14 | 1 | 111 | 0 | 70 | 86 | 70 | self | [] | None | {"Assign": 3, "Expr": 4, "For": 1, "With": 1} | 10 | 17 | 10 | ["data_dir", "open", "pypi.inspect_pypi_package", "self.assertEqual", "self.assertEqual", "self.assertEqual", "set", "set", "expected_file_data.items", "self.assertEqual"] | 0 | [] | The function (test_sdist) defined within the public class called Test, that inherit another class.The function start at line 70 and ends at 86. It contains 14 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 10.0 functions, and ... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_bdist_wheel | def test_bdist_wheel(self):filename = data_dir('test_package34-0.3.1-py2-none-any.whl')with open(filename, 'rb') as file:package_data, version_data, file_data = pypi.inspect_pypi_package(filename, file)expected_file_data = {'attrs': {'abi': None, 'build_no': 0, 'packagetype': 'bdist_wheel', 'python_version': 'py2'},'ba... | 2 | 15 | 1 | 123 | 0 | 88 | 106 | 88 | self | [] | None | {"Assign": 3, "Expr": 4, "For": 1, "With": 1} | 10 | 19 | 10 | ["data_dir", "open", "pypi.inspect_pypi_package", "self.assertEqual", "self.assertEqual", "self.assertEqual", "set", "set", "expected_file_data.items", "self.assertEqual"] | 0 | [] | The function (test_bdist_wheel) defined within the public class called Test, that inherit another class.The function start at line 88 and ends at 106. It contains 15 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 10.0 functions... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_bdist_wheel_newer_version | def test_bdist_wheel_newer_version(self):filename_whl = 'azure_cli_extension-0.2.1-py2.py3-none-any.whl'filename = data_dir(filename_whl)with open(filename, 'rb') as file:package_data, version_data, file_data = pypi.inspect_pypi_package(filename, file)expected_file_data = {'platform': None,'basename': filename_whl,'dep... | 2 | 36 | 1 | 232 | 0 | 108 | 145 | 108 | self | [] | None | {"Assign": 6, "Expr": 4, "For": 1, "With": 1} | 10 | 38 | 10 | ["data_dir", "open", "pypi.inspect_pypi_package", "self.assertEqual", "self.assertEqual", "self.assertEqual", "set", "set", "expected_file_data.items", "self.assertEqual"] | 0 | [] | The function (test_bdist_wheel_newer_version) defined within the public class called Test, that inherit another class.The function start at line 108 and ends at 145. It contains 36 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_bdist_egg | def test_bdist_egg(self):filename = data_dir('test_package34-0.3.1-py2.7.egg')with open(filename, 'rb') as file:package_data, version_data, file_data = pypi.inspect_pypi_package(filename, file)self.assertEqual(expected_package_data, package_data)self.assertEqual(expected_version_data, version_data)self.assertEqual(set(... | 2 | 9 | 1 | 87 | 0 | 147 | 158 | 147 | self | [] | None | {"Assign": 2, "Expr": 4, "For": 1, "With": 1} | 10 | 12 | 10 | ["data_dir", "open", "pypi.inspect_pypi_package", "self.assertEqual", "self.assertEqual", "self.assertEqual", "set", "set", "expected_egg_file_data.items", "self.assertEqual"] | 0 | [] | The function (test_bdist_egg) defined within the public class called Test, that inherit another class.The function start at line 147 and ends at 158. It contains 9 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 10.0 functions, ... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_bdist_egg_dashed_path | def test_bdist_egg_dashed_path(self):filename = data_dir('test_package34-0.3.1-py2.7.egg')tmpdir = tempfile.gettempdir()dash_count = tmpdir.count('-')if dash_count == 0:tmpdir = os.path.join(tmpdir, 'has-dash')try:os.mkdir(tmpdir)except (IOError, OSError) as error:raise unittest.SkipTest('Cannot create temporary direct... | 6 | 27 | 1 | 230 | 0 | 160 | 194 | 160 | self | [] | None | {"Assign": 6, "Expr": 9, "If": 3, "Try": 2, "With": 1} | 21 | 35 | 21 | ["data_dir", "tempfile.gettempdir", "tmpdir.count", "os.path.join", "os.mkdir", "unittest.SkipTest", "unittest.SkipTest", "shutil.copy", "unittest.SkipTest", "os.path.join", "open", "pypi.inspect_pypi_package", "os.remove", "os.rmdir", "self.assertEqual", "self.assertEqual", "self.assertEqual", "set", "set", "self.asse... | 0 | [] | The function (test_bdist_egg_dashed_path) defined within the public class called Test, that inherit another class.The function start at line 160 and ends at 194. It contains 27 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value. It declares 21.... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_sdist_distutils | def test_sdist_distutils(self):filename = data_dir('test_package34-distutils-0.3.1.tar.gz')with open(filename, 'rb') as file:package_data, version_data, file_data = pypi.inspect_pypi_package(filename, file)expected_file_data = {'attrs': {'packagetype': 'sdist', 'python_version': 'source'},'basename': 'test_package34-di... | 2 | 26 | 1 | 209 | 0 | 196 | 224 | 196 | self | [] | None | {"Assign": 5, "Expr": 6, "For": 1, "With": 1} | 14 | 29 | 14 | ["data_dir", "open", "pypi.inspect_pypi_package", "expected_package_data.copy", "replace", "self.assertEqual", "self.assertEqual", "self.assertEqual", "set", "set", "expected_file_data.items", "print", "print", "self.assertEqual"] | 0 | [] | The function (test_sdist_distutils) defined within the public class called Test, that inherit another class.The function start at line 196 and ends at 224. It contains 26 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 14.0 func... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_r | def test_r(self):filename = data_dir('rfordummies_0.1.2.tar.gz')with open(filename, 'rb') as file:package_data, version_data, file_data = r.inspect_r_package(filename, file)self.assertEqual(expected_package_data, package_data)self.assertEqual(expected_version_data, version_data)self.assertEqual(expected_file_data, file... | 1 | 7 | 1 | 59 | 0 | 45 | 52 | 45 | self | [] | None | {"Assign": 2, "Expr": 3, "With": 1} | 6 | 8 | 6 | ["data_dir", "open", "r.inspect_r_package", "self.assertEqual", "self.assertEqual", "self.assertEqual"] | 0 | [] | The function (test_r) defined within the public class called Test, that inherit another class.The function start at line 45 and ends at 52. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has... |
anaconda_anaconda-client | public | public | 0 | 0 | test_find_conda | def test_find_conda() -> None:"""Check :func:`~binstar_client.utils.conda.find_conda`."""conda_info: conda.CondaInfo = typing.cast(conda.CondaInfo, conda.find_conda())assert conda_infoassert conda_info['CONDA_EXE']assert os.path.isfile(conda_info['CONDA_EXE'])assert conda_info['CONDA_PREFIX']assert os.path.isdir(conda_... | 1 | 9 | 0 | 80 | 0 | 15 | 27 | 15 | [] | None | {"AnnAssign": 1, "Expr": 1} | 5 | 13 | 5 | ["typing.cast", "conda.find_conda", "os.path.isfile", "os.path.isdir", "os.path.isdir"] | 0 | [] | The function (test_find_conda) defined within the public class called public.The function start at line 15 and ends at 27. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has 5.0 functions ca... | |
anaconda_anaconda-client | public | public | 0 | 0 | test_conda_vars | def test_conda_vars() -> None:"""Check lazy :data:`~binstar_client.utils.conda.CONDA_INFO` and other related lazy module properties."""assert conda.CONDA_INFOassert conda.CONDA_EXEassert conda.CONDA_EXE is typing.cast(conda.CondaInfo, conda.CONDA_INFO)['CONDA_EXE']assert os.path.isfile(conda.CONDA_EXE)assert conda.COND... | 1 | 11 | 0 | 116 | 0 | 30 | 44 | 30 | [] | None | {"Expr": 1} | 6 | 15 | 6 | ["typing.cast", "os.path.isfile", "typing.cast", "os.path.isdir", "typing.cast", "os.path.isdir"] | 0 | [] | The function (test_conda_vars) defined within the public class called public.The function start at line 30 and ends at 44. It contains 11 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has 6.0 functions c... | |
anaconda_anaconda-client | Test | public | 0 | 1 | create_config_dirs | def create_config_dirs(self):tmpdir = tempfile.mkdtemp()self.addCleanup(shutil.rmtree, tmpdir)system_dir = os.path.join(tmpdir, 'system')user_dir = os.path.join(tmpdir, 'user')os.mkdir(system_dir)os.mkdir(user_dir)return user_dir, system_dir | 1 | 8 | 1 | 62 | 0 | 22 | 29 | 22 | self | [] | Returns | {"Assign": 3, "Expr": 3, "Return": 1} | 6 | 8 | 6 | ["tempfile.mkdtemp", "self.addCleanup", "os.path.join", "os.path.join", "os.mkdir", "os.mkdir"] | 0 | [] | The function (create_config_dirs) defined within the public class called Test, that inherit another class.The function start at line 22 and ends at 29. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 6.0 functi... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_defaults | def test_defaults(self):user_dir, system_dir = self.create_config_dirs()with open(os.path.join(user_dir, 'config.yaml'), 'wb') as file:file.write(b'')with unittest.mock.patch('binstar_client.utils.config.SEARCH_PATH', [system_dir, user_dir]):cfg = config.get_config()self.assertEqual(cfg, config.DEFAULT_CONFIG) | 1 | 7 | 1 | 73 | 0 | 31 | 38 | 31 | self | [] | None | {"Assign": 2, "Expr": 2, "With": 2} | 7 | 8 | 7 | ["self.create_config_dirs", "open", "os.path.join", "file.write", "unittest.mock.patch", "config.get_config", "self.assertEqual"] | 0 | [] | The function (test_defaults) defined within the public class called Test, that inherit another class.The function start at line 31 and ends at 38. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 7.0 functions, and ... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_global_url | def test_global_url(self):"""Test regression reported on:https://github.com/Anaconda-Platform/anaconda-client/issues/464"""user_dir, system_dir = self.create_config_dirs()with open(os.path.join(user_dir, 'config.yaml'), 'wb') as file:file.write(b'')url_data = {'url': 'https://blob.org'}config_data = config.DEFAULT_CONF... | 1 | 11 | 1 | 111 | 0 | 40 | 57 | 40 | self | [] | None | {"Assign": 4, "Expr": 5, "With": 2} | 11 | 18 | 11 | ["self.create_config_dirs", "open", "os.path.join", "file.write", "config.DEFAULT_CONFIG.copy", "config_data.update", "unittest.mock.patch", "config.save_config", "os.path.join", "config.get_config", "self.assertEqual"] | 0 | [] | The function (test_global_url) defined within the public class called Test, that inherit another class.The function start at line 40 and ends at 57. It contains 11 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 11.0 functions, ... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_merge | def test_merge(self):user_dir, system_dir = self.create_config_dirs()with open(os.path.join(system_dir, 'config.yaml'), 'wb') as file:file.write(b'''ssl_verify: falsesites:develop:url: http://develop.anaconda.org''')with open(os.path.join(user_dir, 'config.yaml'), 'wb') as file:file.write(b'''ssl_verify: truesites:deve... | 1 | 20 | 1 | 132 | 0 | 59 | 93 | 59 | self | [] | None | {"Assign": 2, "Expr": 3, "With": 3} | 11 | 35 | 11 | ["self.create_config_dirs", "open", "os.path.join", "file.write", "open", "os.path.join", "file.write", "unittest.mock.patch", "unittest.mock.patch", "config.get_config", "self.assertEqual"] | 0 | [] | The function (test_merge) defined within the public class called Test, that inherit another class.The function start at line 59 and ends at 93. It contains 20 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 11.0 functions, and ... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_support_tags | def test_support_tags(self):user_dir, system_dir = self.create_config_dirs()with open(os.path.join(user_dir, 'config.yaml'), 'wb') as file:file.write(b'''!!python/unicode 'sites': !!python/unicode 'alpha': {!!python/unicode 'url': !!python/unicode 'foobar'} !!python/unicode 'binstar': {!!python/unicode 'url': !!python/... | 1 | 21 | 1 | 110 | 0 | 95 | 124 | 95 | self | [] | None | {"Assign": 2, "Expr": 2, "With": 2} | 8 | 30 | 8 | ["self.create_config_dirs", "open", "os.path.join", "file.write", "unittest.mock.patch", "unittest.mock.patch", "config.get_config", "self.assertEqual"] | 0 | [] | The function (test_support_tags) defined within the public class called Test, that inherit another class.The function start at line 95 and ends at 124. It contains 21 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 8.0 functions... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_load_config | def test_load_config(self, mock_yaml_load, mock_warnings):tmpdir = tempfile.mkdtemp()tmp_config = os.path.join(tmpdir, 'config.yaml')with open(tmp_config, 'w', encoding='utf-8') as file:config.yaml_dump(self.CONFIG_DATA, file)with self.subTest('OK'):self.assertEqual(self.CONFIG_DATA, config.load_config(tmp_config))mock... | 1 | 25 | 3 | 225 | 0 | 128 | 160 | 128 | self,mock_yaml_load,mock_warnings | [] | None | {"Assign": 5, "Expr": 14, "With": 5} | 28 | 33 | 28 | ["tempfile.mkdtemp", "os.path.join", "open", "config.yaml_dump", "self.subTest", "self.assertEqual", "config.load_config", "mock_warnings.warn.assert_not_called", "self.subTest", "self.assertEqual", "config.load_config", "self.assertTrue", "os.path.exists", "os.remove", "mock_warnings.warn.assert_called", "mock_warning... | 0 | [] | The function (test_load_config) defined within the public class called Test, that inherit another class.The function start at line 128 and ends at 160. It contains 25 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [128.0] and does not return any value. It declares 28.0 func... |
anaconda_anaconda-client | Test | public | 0 | 1 | test_save_config | def test_save_config(self, mock_os_replace, mock_os_makedirs):config_filename = 'config.yaml'with self.subTest('OK'), tempfile.TemporaryDirectory() as test_config_dir:config_path = os.path.join(test_config_dir, config_filename)config.save_config(self.CONFIG_DATA, config_path)self.assertEqual(self.CONFIG_DATA, config.lo... | 1 | 18 | 3 | 179 | 0 | 164 | 187 | 164 | self,mock_os_replace,mock_os_makedirs | [] | None | {"Assign": 4, "Expr": 10, "With": 3} | 21 | 24 | 21 | ["self.subTest", "tempfile.TemporaryDirectory", "os.path.join", "config.save_config", "self.assertEqual", "config.load_config", "mock_os_makedirs.assert_called_once_with", "mock_os_replace.assert_called_once_with", "mock_os_replace.reset_mock", "mock_os_makedirs.reset_mock", "self.subTest", "tempfile.TemporaryDirectory... | 0 | [] | The function (test_save_config) defined within the public class called Test, that inherit another class.The function start at line 164 and ends at 187. It contains 18 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [164.0] and does not return any value. It declares 21.0 func... |
anaconda_anaconda-client | IsProjectTestCase | public | 0 | 1 | test_python_file | def test_python_file(self):is_project(example_path('bokeh-apps/timeout.py')) | 1 | 2 | 1 | 12 | 0 | 8 | 9 | 8 | self | [] | None | {"Expr": 1} | 2 | 2 | 2 | ["is_project", "example_path"] | 0 | [] | The function (test_python_file) defined within the public class called IsProjectTestCase, that inherit another class.The function start at line 8 and ends at 9. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 f... |
anaconda_anaconda-client | IsProjectTestCase | public | 0 | 1 | test_dir_project | def test_dir_project(self):is_project(example_path('bokeh-apps/weather')) | 1 | 2 | 1 | 12 | 0 | 11 | 12 | 11 | self | [] | None | {"Expr": 1} | 2 | 2 | 2 | ["is_project", "example_path"] | 0 | [] | The function (test_dir_project) defined within the public class called IsProjectTestCase, that inherit another class.The function start at line 11 and ends at 12. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0... |
anaconda_anaconda-client | public | public | 0 | 0 | test_parse_specs | def test_parse_specs():# Reproducing for https://github.com/anaconda/anaconda-client/issues/642spec = binstar_client.utils.spec.parse_specs("someuser/foo/1.2.3/blah-1.2.3.tar.bz2?x=1")assert spec.user == "someuser"assert spec.name == "foo"assert spec.version == "1.2.3"assert spec.basename == "blah-1.2.3.tar.bz2"assert ... | 1 | 7 | 0 | 50 | 1 | 4 | 11 | 4 | ['spec'] | None | {"Assign": 1} | 1 | 8 | 1 | ["binstar_client.utils.spec.parse_specs"] | 0 | [] | The function (test_parse_specs) defined within the public class called public.The function start at line 4 and ends at 11. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function calle... | |
anaconda_anaconda-client | public | public | 0 | 0 | data_dir | def data_dir(filename):base_path = inspect.stack()[1][1]# function caller pathtest_data = os.path.join(os.path.dirname(base_path), 'data')return os.path.join(test_data, filename) | 1 | 4 | 1 | 48 | 2 | 5 | 8 | 5 | filename | ['base_path', 'test_data'] | Returns | {"Assign": 2, "Return": 1} | 4 | 4 | 4 | ["inspect.stack", "os.path.join", "os.path.dirname", "os.path.join"] | 45 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.tests.inspect_package.test_conda_py.Test.test_conda", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.tests.inspect_package.test_conda_py.Test.test_c... | The function (data_dir) defined within the public class called public.The function start at line 5 and ends at 8. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 4.0 functions, It has 4.0 functions called insid... |
anaconda_anaconda-client | public | public | 0 | 0 | example_path | def example_path(example):return os.path.join(os.path.dirname(__file__), '../../../example-packages', example) | 1 | 2 | 1 | 25 | 0 | 11 | 12 | 11 | example | [] | Returns | {"Return": 1} | 2 | 2 | 2 | ["os.path.join", "os.path.dirname"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.tests.utils.test_detect_py.IsProjectTestCase.test_dir_project", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.tests.utils.test_detect_py.IsProjectT... | The function (example_path) defined within the public class called public.The function start at line 11 and ends at 12. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, It has 2.0 functions called... |
anaconda_anaconda-client | ParseTestCase | public | 0 | 1 | test_parse | def test_parse(self):self.assertEqual(parse('user/notebook-ipynb')[0], 'user')self.assertEqual(parse('user/notebook-ipynb')[1], 'notebook-ipynb')self.assertIsNone(parse('notebook')[0])self.assertEqual(parse('notebook')[1], 'notebook') | 1 | 5 | 1 | 59 | 0 | 8 | 13 | 8 | self | [] | None | {"Expr": 4} | 8 | 6 | 8 | ["self.assertEqual", "parse", "self.assertEqual", "parse", "self.assertIsNone", "parse", "self.assertEqual", "parse"] | 0 | [] | The function (test_parse) defined within the public class called ParseTestCase, that inherit another class.The function start at line 8 and ends at 13. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 8.0 functions,... |
anaconda_anaconda-client | NotebookURLTestCase | public | 0 | 1 | test_anaconda_org_installation | def test_anaconda_org_installation(self):upload_info = {'url': 'http://anaconda.org/darth/deathstart-ipynb'}url = 'http://notebooks.anaconda.org/darth/deathstart-ipynb'self.assertEqual(notebook_url(upload_info), url) | 1 | 4 | 1 | 26 | 0 | 17 | 20 | 17 | self | [] | None | {"Assign": 2, "Expr": 1} | 2 | 4 | 2 | ["self.assertEqual", "notebook_url"] | 0 | [] | The function (test_anaconda_org_installation) defined within the public class called NotebookURLTestCase, that inherit another class.The function start at line 17 and ends at 20. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.... |
anaconda_anaconda-client | NotebookURLTestCase | public | 0 | 1 | test_anaconda_server_installation | def test_anaconda_server_installation(self):upload_info = {'url': 'http://custom/darth/deathstart-ipynb'}url = 'http://custom/notebooks/darth/deathstart-ipynb'self.assertEqual(notebook_url(upload_info), url) | 1 | 4 | 1 | 26 | 0 | 22 | 25 | 22 | self | [] | None | {"Assign": 2, "Expr": 1} | 2 | 4 | 2 | ["self.assertEqual", "notebook_url"] | 0 | [] | The function (test_anaconda_server_installation) defined within the public class called NotebookURLTestCase, that inherit another class.The function start at line 22 and ends at 25. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any val... |
anaconda_anaconda-client | HasEnvironmentTestCase | public | 0 | 1 | test_has_no_environment | def test_has_no_environment(self):self.assertFalse(has_environment(data_dir('notebook.ipynb'))) | 1 | 2 | 1 | 17 | 0 | 29 | 30 | 29 | self | [] | None | {"Expr": 1} | 3 | 2 | 3 | ["self.assertFalse", "has_environment", "data_dir"] | 0 | [] | The function (test_has_no_environment) defined within the public class called HasEnvironmentTestCase, that inherit another class.The function start at line 29 and ends at 30. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It ... |
anaconda_anaconda-client | HasEnvironmentTestCase | public | 0 | 1 | test_has_environment | def test_has_environment(self):self.assertTrue(has_environment(data_dir('notebook_with_env.ipynb'))) | 1 | 2 | 1 | 17 | 0 | 32 | 33 | 32 | self | [] | None | {"Expr": 1} | 3 | 2 | 3 | ["self.assertTrue", "has_environment", "data_dir"] | 0 | [] | The function (test_has_environment) defined within the public class called HasEnvironmentTestCase, that inherit another class.The function start at line 32 and ends at 33. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It dec... |
anaconda_anaconda-client | HasEnvironmentTestCase | public | 0 | 1 | test_no_file | def test_no_file(self):self.assertFalse(has_environment('no-file')) | 1 | 2 | 1 | 14 | 0 | 35 | 36 | 35 | self | [] | None | {"Expr": 1} | 2 | 2 | 2 | ["self.assertFalse", "has_environment"] | 0 | [] | The function (test_no_file) defined within the public class called HasEnvironmentTestCase, that inherit another class.The function start at line 35 and ends at 36. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.... |
anaconda_anaconda-client | DataURIConverterTestCase | public | 0 | 1 | test_local_image | def test_local_image(self):location = data_dir('bokeh-logo.png')output = DataURIConverter(location)()self.assertEqual(output[0:5], 'iVBOR') | 1 | 4 | 1 | 32 | 0 | 8 | 11 | 8 | self | [] | None | {"Assign": 2, "Expr": 1} | 3 | 4 | 3 | ["data_dir", "DataURIConverter", "self.assertEqual"] | 0 | [] | The function (test_local_image) defined within the public class called DataURIConverterTestCase, that inherit another class.The function start at line 8 and ends at 11. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declar... |
anaconda_anaconda-client | DataURIConverterTestCase | public | 0 | 1 | test_file_not_found | def test_file_not_found(self):location = data_dir('no-exists.png')with self.assertRaises(IOError):DataURIConverter(location)() | 1 | 4 | 1 | 25 | 0 | 13 | 16 | 13 | self | [] | None | {"Assign": 1, "Expr": 1, "With": 1} | 3 | 4 | 3 | ["data_dir", "self.assertRaises", "DataURIConverter"] | 0 | [] | The function (test_file_not_found) defined within the public class called DataURIConverterTestCase, that inherit another class.The function start at line 13 and ends at 16. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It de... |
anaconda_anaconda-client | DataURIConverterTestCase | public | 0 | 1 | test_is_python_3 | def test_is_python_3(self):output = DataURIConverter('')self.assertIsInstance(output.is_py3(), bool) | 1 | 3 | 1 | 23 | 0 | 18 | 20 | 18 | self | [] | None | {"Assign": 1, "Expr": 1} | 3 | 3 | 3 | ["DataURIConverter", "self.assertIsInstance", "output.is_py3"] | 0 | [] | The function (test_is_python_3) defined within the public class called DataURIConverterTestCase, that inherit another class.The function start at line 18 and ends at 20. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It decla... |
anaconda_anaconda-client | DataURIConverterTestCase | public | 0 | 1 | test_is_url | def test_is_url(self):location = 'http://docs.continuum.io/_static/img/continuum_analytics_logo.png'self.assertTrue(DataURIConverter(location).is_url())location = data_dir('bokeh-logo.png')self.assertNotEqual(DataURIConverter(location).is_url(), True) | 1 | 5 | 1 | 42 | 0 | 22 | 27 | 22 | self | [] | None | {"Assign": 2, "Expr": 2} | 7 | 6 | 7 | ["self.assertTrue", "is_url", "DataURIConverter", "data_dir", "self.assertNotEqual", "is_url", "DataURIConverter"] | 0 | [] | The function (test_is_url) defined within the public class called DataURIConverterTestCase, that inherit another class.The function start at line 22 and ends at 27. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 7... |
anaconda_anaconda-client | DownloaderTestCase | public | 0 | 1 | test_ensure_location | def test_ensure_location(self):aserver_api = mock.MagicMock()aserver_api.package = mock.MagicMock(return_value=files)downloader = Downloader(aserver_api, 'username', 'notebook')self.assertEqual(downloader.list_files()[0]['version'], '2')self.assertEqual(downloader.list_files()[1]['version'], '2') | 1 | 6 | 1 | 70 | 0 | 17 | 23 | 17 | self | [] | None | {"Assign": 3, "Expr": 2} | 7 | 7 | 7 | ["mock.MagicMock", "mock.MagicMock", "Downloader", "self.assertEqual", "downloader.list_files", "self.assertEqual", "downloader.list_files"] | 0 | [] | The function (test_ensure_location) defined within the public class called DownloaderTestCase, that inherit another class.The function start at line 17 and ends at 23. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare... |
anaconda_anaconda-client | DownloaderTestCase | public | 0 | 1 | test_can_download | def test_can_download(self):package_1 = {'basename': 'notebook.ipynb'}package_2 = {'basename': 'NOEXIST'}downloader = Downloader('binstar', 'username', 'notebook')downloader.output = data_dir('')self.assertTrue(not downloader.can_download(package_1))self.assertTrue(downloader.can_download(package_1, True))self.assertTr... | 1 | 8 | 1 | 73 | 0 | 25 | 32 | 25 | self | [] | None | {"Assign": 4, "Expr": 3} | 8 | 8 | 8 | ["Downloader", "data_dir", "self.assertTrue", "downloader.can_download", "self.assertTrue", "downloader.can_download", "self.assertTrue", "downloader.can_download"] | 0 | [] | The function (test_can_download) defined within the public class called DownloaderTestCase, that inherit another class.The function start at line 25 and ends at 32. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 8... |
anaconda_anaconda-client | DownloaderTestCase | public | 0 | 1 | test_list_old_files | def test_list_old_files(self):old_files = {'files': [{'basename': 'old-notebook', 'version': '1.0.0', 'upload_time': '2015-04-02 22:32:31.253000+00:00'}]}aserver_api = mock.MagicMock()aserver_api.package = mock.MagicMock(return_value=old_files)downloader = Downloader(aserver_api, 'username', 'notebook')self.assertEqual... | 1 | 10 | 1 | 73 | 0 | 34 | 44 | 34 | self | [] | None | {"Assign": 4, "Expr": 1} | 5 | 11 | 5 | ["mock.MagicMock", "mock.MagicMock", "Downloader", "self.assertEqual", "downloader.list_files"] | 0 | [] | The function (test_list_old_files) defined within the public class called DownloaderTestCase, that inherit another class.The function start at line 34 and ends at 44. It contains 10 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare... |
anaconda_anaconda-client | InflectorsTestCase | public | 0 | 1 | test_one_directory | def test_one_directory(self):self.assertEqual(inflection.parameterize('Donald E. Knuth'), 'donald-e-knuth') | 1 | 2 | 1 | 18 | 0 | 6 | 7 | 6 | self | [] | None | {"Expr": 1} | 2 | 2 | 2 | ["self.assertEqual", "inflection.parameterize"] | 0 | [] | The function (test_one_directory) defined within the public class called InflectorsTestCase, that inherit another class.The function start at line 6 and ends at 7. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.... |
anaconda_anaconda-client | UploaderTestCase | public | 0 | 1 | test_release | def test_release(self):aserver_api = mock.MagicMock()aserver_api.release.return_value = 'release'uploader = Uploader(aserver_api, 'notebook')self.assertEqual(uploader.release, 'release') | 1 | 5 | 1 | 37 | 0 | 9 | 13 | 9 | self | [] | None | {"Assign": 3, "Expr": 1} | 3 | 5 | 3 | ["mock.MagicMock", "Uploader", "self.assertEqual"] | 0 | [] | The function (test_release) defined within the public class called UploaderTestCase, that inherit another class.The function start at line 9 and ends at 13. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 funct... |
anaconda_anaconda-client | UploaderTestCase | public | 0 | 1 | test_release_not_exist | def test_release_not_exist(self):aserver_api = mock.MagicMock()aserver_api.release.side_effect = errors.NotFound([])aserver_api.add_release.return_value = 'release'uploader = Uploader(aserver_api, 'project')self.assertEqual(uploader.release, 'release') | 1 | 6 | 1 | 50 | 0 | 15 | 20 | 15 | self | [] | None | {"Assign": 4, "Expr": 1} | 4 | 6 | 4 | ["mock.MagicMock", "errors.NotFound", "Uploader", "self.assertEqual"] | 0 | [] | The function (test_release_not_exist) defined within the public class called UploaderTestCase, that inherit another class.The function start at line 15 and ends at 20. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare... |
anaconda_anaconda-client | UploaderTestCase | public | 0 | 1 | test_package | def test_package(self):aserver_api = mock.MagicMock()aserver_api.package.side_effect = errors.NotFound([])aserver_api.add_package.return_value = 'package'uploader = Uploader(aserver_api, 'project')self.assertEqual(uploader.package, 'package') | 1 | 6 | 1 | 50 | 0 | 22 | 27 | 22 | self | [] | None | {"Assign": 4, "Expr": 1} | 4 | 6 | 4 | ["mock.MagicMock", "errors.NotFound", "Uploader", "self.assertEqual"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3678342_kieranjol_ifiscripts.packagecheck_py.main"] | The function (test_package) defined within the public class called UploaderTestCase, that inherit another class.The function start at line 22 and ends at 27. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 func... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.