tests.test_manager_apm moduleΒΆ

Atom package manager output tests.

These tests stub run_cli and replay the samples documented on APM. They never call apm.

tests.test_manager_apm.SEARCH_OUTPUT = '[\n  {\n    "name": "atom-python-run",\n    "main": "./lib/atom-python-run.js",\n    "version": "0.7.3",\n    "description": "Run a python source file.",\n    "keywords": [\n      "python"\n    ],\n    "repository": "https://github.com/foreshadow/atom-python-run",\n    "license": "MIT",\n    "engines": {\n      "atom": ">=1.0.0 <2.0.0"\n    },\n    "dependencies": {},\n    "readme": "Blah blah",\n    "downloads": 41379,\n    "stargazers_count": 16\n  },\n  {\n    "name": "build-python",\n    "version": "0.6.3",\n    "description": "Atom Build provider for python/python3",\n    "repository": "https://github.com/idleberg/atom-build-python",\n    "license": "MIT",\n    "keywords": [\n      "buildprovider",\n      "compile",\n      "python",\n      "python3",\n      "linter",\n      "lint"\n    ],\n    "main": "lib/provider.js",\n    "engines": {\n      "atom": ">=1.0.0 <2.0.0"\n    },\n    "providedServices": {\n      "builder": {\n        "description": "Compiles Python",\n        "versions": {\n          "2.0.0": "provideBuilder"\n        }\n      }\n    },\n    "package-deps": [\n      "build"\n    ],\n    "dependencies": {\n      "atom-package-deps": "^4.3.1"\n    },\n    "devDependencies": {\n      "babel-eslint": "^7.1.1",\n      "coffeelint-stylish": "^0.1.2",\n      "eslint": "^3.13.1",\n      "eslint-config-atom-build": "^4.0.0",\n      "gulp": "github:gulpjs/gulp#4.0",\n      "gulp-coffeelint": "^0.6.0",\n      "gulp-debug": "^3.0.0",\n      "gulp-jshint": "^2.0.4",\n      "gulp-jsonlint": "^1.2.0",\n      "gulp-lesshint": "^2.1.0",\n      "jshint": "^2.9.4"\n    },\n    "scripts": {\n      "test": "gulp lint"\n    },\n    "readme": "Blah blah",\n    "downloads": 2838,\n    "stargazers_count": 0\n  }\n]'ΒΆ

apm search --json python | jq, as the docstring of search() shows it, minus the (...) marker that truncates the array there.

Each result gives its name, description and version.

Only an extended search lets apm match the descriptions.

tests.test_manager_apm.test_search_empty_answer(stub_run_cli, output)[source]ΒΆ

No output and an empty array both mean no match.