[
  {
    "path": ".coveragerc",
    "content": "[run]\nomit =\n    */tests*\n\n[report]\nexclude_lines =\n    pragma: no cover\n    def __repr__\n    raise NotImplementedError\n    if __name__ == .__main__.:\n    def parse_args"
  },
  {
    "path": ".coveralls.yml",
    "content": ""
  },
  {
    "path": ".gitignore",
    "content": "*.py[cod]\nvenv*\n\n# C extensions\n*.so\n\n# Packages\n*.egg\n*.egg-info\ndist\nbuild\neggs\nparts\nbin\nvar\nsdist\ndevelop-eggs\n.installed.cfg\nlib\nlib64\n\n# Installer logs\npip-log.txt\n\n# Unit test / coverage reports\n.coverage\n.tox\nnosetests.xml\n.cache\n\n# Translations\n*.mo\n\n# Mr Developer\n.mr.developer.cfg\n.project\n.pydevproject\n.idea\n\n# Sample\npython-coveralls-example\n"
  },
  {
    "path": ".travis.yml",
    "content": "language: python\npython:\n  - \"2.7\"\n  - \"3.5\"\n  - \"3.6\"\ninstall:\n  - pip install -U pip\n  - python setup.py develop\nbefore_script:\n  - pip install -I -r test_requirements.txt\n  - git clone https://github.com/z4r/python-coveralls-example.git\n  - cd python-coveralls-example\n  - git checkout -qf 3e82fd5159b84bebe9bc6c9fd3959f322e6f7098\n  - py.test example/tests.py --cov=example\n  - cd -\nscript:\n  - py.test coveralls/tests.py --doctest-modules --pep8 coveralls -v --cov coveralls --cov-report term-missing\nafter_success:\n  - coveralls\n"
  },
  {
    "path": "LICENSE",
    "content": "Copyright 2013 Andrea De Marco.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expressed or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License."
  },
  {
    "path": "MANIFEST.in",
    "content": "include LICENSE README.* *.txt\n"
  },
  {
    "path": "README.rst",
    "content": "====================================\nPython interface to coveralls.io API\n====================================\n\n.. image:: https://api.travis-ci.org/z4r/python-coveralls.png?branch=master\n    :target: http://travis-ci.org/z4r/python-coveralls\n.. image:: https://coveralls.io/repos/z4r/python-coveralls/badge.png?branch=master\n    :target: https://coveralls.io/r/z4r/python-coveralls\n.. image:: https://img.shields.io/pypi/v/python-coveralls.svg\n    :target: https://pypi.python.org/pypi/python-coveralls/\n.. image:: https://img.shields.io/pypi/dm/python-coveralls.svg\n    :target: https://pypi.python.org/pypi/python-coveralls/\n.. image:: https://img.shields.io/pypi/wheel/python-coveralls.svg\n    :target: https://pypi.python.org/pypi/python-coveralls/\n    :alt: Wheel Status\n\nThis package provides a module to interface with the https://coveralls.io API.\n\nINSTALLING THE PKG\n==================\nUsing pip::\n\n    $ pip install python-coveralls\n\n...Or simply add it to your requirements.\n\n\nCONFIGURATION\n=============\nIf you're not using Travis, Coveralls for Python uses a ``.coveralls.yml`` file at the root level of your repository to configure options.\nThe only required option is ``repo_token`` (found on your repository's page on Coveralls) to specify which project on Coveralls your project maps to.\nAnother important option is is ``service_name`` which allows you to specify where Coveralls should look to find additional information about your builds. This can be any string, but using travis-ci or travis-pro will allow Coveralls to fetch branch data, comment on pull requests, and more.\nA ``.coveralls.yml`` file configured for Travis Pro:\n\n.. code-block:: yaml\n\n    repo_token: abcdef1234569abdcef\n    service_name: travis-pro\n    parallel: true # if the CI is running your build in parallel\n\nif you don't want the ``repo_token`` under source control, set it in your ``coveralls`` command::\n\n    COVERALLS_REPO_TOKEN=abcdef1234569abdcef coveralls\n\nTRAVIS.YML\n==========\nCreate a ``.coverage`` file and you can use `coverage <https://pypi.python.org/pypi/coverage>`_,\n`pytest-cov <https://pypi.python.org/pypi/pytest-cov>`_, or\n`nosexcover <https://pypi.python.org/pypi/nosexcover>`_.\nThen you can add in the **after_success** step::\n\n    coveralls\n\nIt should look like something like:\n\n.. code-block:: yaml\n\n    language: python\n    python:\n      - \"2.6\"\n      - \"2.7\"\n    install:\n      - pip install -e . --use-mirrors\n    before_script:\n      - pip install -r test_requirements.txt --use-mirrors\n      - git clone https://github.com/z4r/python-coveralls-example.git\n      - cd python-coveralls-example\n      - git checkout -qf 17b8119796516195527dcb4f454a2ebd41d60244\n      - py.test example/tests.py --cov=example\n      - cd -\n    script:\n      - py.test coveralls/tests.py --doctest-modules --pep8 coveralls -v --cov coveralls --cov-report term-missing\n    after_success:\n      - coveralls\n\nCOVERALLS OPTIONS\n=================\nYou probably don't need to configure anything, but if you customize some option of `coverage` you would add it to `coveralls` too::\n\n    $ coveralls -h\n    usage: coveralls [-h] [--coveralls_url COVERALLS_URL] [--base_dir BASE_DIR]\n                     [--data_file DATA_FILE] [--config_file CONFIG_FILE]\n                     [--coveralls_yaml COVERALLS_YAML] [--ignore-errors]\n                     [--merge_file MERGE_FILE] [--nogit]\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      --coveralls_url COVERALLS_URL, -u COVERALLS_URL\n                            coveralls.io api url\n      --base_dir BASE_DIR, -b BASE_DIR\n                            project root directory\n      --data_file DATA_FILE, -d DATA_FILE\n                            coverage file name\n      --config_file CONFIG_FILE, -c CONFIG_FILE\n                            coverage config file name\n      --coveralls_yaml COVERALLS_YAML, -y COVERALLS_YAML\n                            coveralls yaml file name\n      --ignore-errors, -i   ignore errors while reading source files\n      --merge_file MERGE_FILE, -m MERGE_FILE\n                            json file containing coverage data to be merged (for\n                            merging javascript coverage)\n      --nogit               do not gather git repo info\n\n\n\n\n.. image:: https://d2weczhvl823v0.cloudfront.net/z4r/python-coveralls/trend.png\n   :alt: Bitdeli badge\n   :target: https://bitdeli.com/free\n"
  },
  {
    "path": "appveyor.yml",
    "content": "environment:\n  matrix:\n  - PYTHON: C:\\Python27\\python.exe\n    platform: Any CPU\n  - PYTHON: C:\\Python33\\python.exe\n    platform: Any CPU\n  - PYTHON: C:\\Python34\\python.exe\n    platform: Any CPU\n  - PYTHON: C:\\Python35\\python.exe\n    platform: Any CPU\n\nbefore_build:\n  - \"%PYTHON% -m pip install virtualenv\"\n  - \"%PYTHON% -m virtualenv venv\"\n  - venv\\Scripts\\activate.bat\n\nbuild_script:\n  - pip install -U pip\n  - python setup.py develop\n\nbefore_test:\n  - pip install -r test_requirements.txt\n  - 'git clone https://github.com/z4r/python-coveralls-example.git'\n  - cd python-coveralls-example\n  - git checkout -qf 3e82fd5159b84bebe9bc6c9fd3959f322e6f7098\n  - py.test example/tests.py --cov=example\n  - cd %APPVEYOR_BUILD_FOLDER%\n\ntest_script:\n  - py.test coveralls/tests.py --doctest-modules --pep8 coveralls -v --cov coveralls --cov-report term-missing\n\n#on_success:\n#  - coveralls\n"
  },
  {
    "path": "coveralls/__init__.py",
    "content": "__author__ = 'Andrea De Marco <24erre@gmail.com>'\n__version__ = '2.9.3'\n__classifiers__ = [\n    'Development Status :: 5 - Production/Stable',\n    'Intended Audience :: Developers',\n    'License :: OSI Approved :: Apache Software License',\n    'Operating System :: OS Independent',\n    'Programming Language :: Python :: 2.7',\n    'Programming Language :: Python :: 3.5',\n    'Programming Language :: Python :: 3.6',\n    'Topic :: Internet :: WWW/HTTP',\n    'Topic :: Software Development :: Libraries',\n]\n__copyright__ = \"2013, %s \" % __author__\n__license__ = \"\"\"\n   Copyright %s.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expressed or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\"\"\" % __copyright__\n\n__docformat__ = 'restructuredtext en'\n\n__doc__ = \"\"\"\n:abstract: Python interface to coveralls.io API\n:version: %s\n:author: %s\n:contact: http://z4r.github.com/\n:date: 2012-02-08\n:copyright: %s\n\"\"\" % (__version__, __author__, __license__)\n\n\ndef parse_args():\n    import os\n    import yaml\n    import argparse\n    parser = argparse.ArgumentParser(prog='coveralls')\n    parser.add_argument('--coveralls_url', '-u', help='coveralls.io api url', default='https://coveralls.io/api/v1/jobs')\n    parser.add_argument('--base_dir', '-b', help='project root directory', default='.')\n    parser.add_argument('--data_file', '-d', help='coverage file name', default=None)\n    parser.add_argument('--config_file', '-c', help='coverage config file name', default=None)\n    parser.add_argument('--coveralls_yaml', '-y', help='coveralls yaml file name', default='.coveralls.yml')\n    parser.add_argument('--ignore-errors', '-i', help='ignore errors while reading source files', action='store_true', default=False)\n    parser.add_argument('--merge_file', '-m', help='json file containing coverage data to be merged (for merging javascript coverage)', default=None)\n    parser.add_argument('--nogit', help='do not gather git repo info', action='store_true', default=False)\n    parser.add_argument('--skip_ssl_verify', help='skip ssl certificate verification when communicating with the coveralls server', action='store_true', default=False)\n    args = parser.parse_args()\n    args.base_dir = os.path.abspath(args.base_dir)\n    args.data_file = os.path.join(args.base_dir, args.data_file) if args.data_file else None\n    args.config_file = os.path.join(args.base_dir, args.config_file) if args.config_file else True\n    args.coveralls_yaml = os.path.join(args.base_dir, args.coveralls_yaml)\n    args.merge_file = os.path.join(args.base_dir, args.merge_file) if args.merge_file else None\n    yml = {}\n    try:\n        with open(args.coveralls_yaml, 'r') as fp:\n            yml = yaml.load(fp, Loader=yaml.SafeLoader)\n    except:\n        pass\n    yml = yml or {}\n    args.repo_token = yml.get('repo_token') or os.environ.get('COVERALLS_REPO_TOKEN') or ''\n    args.service_name = yml.get('service_name') or os.environ.get('COVERALLS_SERVICE_NAME') or 'travis-ci'\n    args.service_job_id = os.environ.get('TRAVIS_JOB_ID', '')\n    args.parallel = yml.get('parallel', os.environ.get('COVERALLS_PARALLEL', False))\n    return args\n\n\ndef wear(args=None):\n    from coveralls.control import coveralls\n    from coveralls.repository import repo\n    from coveralls.api import post\n    import logging\n    logging.basicConfig(level=logging.INFO)\n    logger = logging.getLogger('coveralls')\n    args = args or parse_args()\n    coverage = coveralls(data_file=args.data_file, config_file=args.config_file)\n    coverage.load()\n    response = post(\n        url=args.coveralls_url,\n        repo_token=args.repo_token,\n        service_job_id=args.service_job_id,\n        service_name=args.service_name,\n        git=repo(args.base_dir) if not args.nogit else {},\n        source_files=coverage.coveralls(args.base_dir, ignore_errors=args.ignore_errors, merge_file=args.merge_file),\n        parallel=args.parallel,\n        skip_ssl_verify=args.skip_ssl_verify,\n    )\n    logger.info(response.status_code)\n    logger.info(response.text)\n    return 1 if 'error' in response.json() else 0\n"
  },
  {
    "path": "coveralls/api.py",
    "content": "import json\nfrom six import StringIO\nimport requests\n\n\ndef post(url, repo_token, service_job_id, service_name, git, source_files, parallel, skip_ssl_verify=False):\n    json_file = build_file(repo_token, service_job_id, service_name, git, source_files, parallel)\n    return requests.post(url, files={'json_file': json_file}, verify=(not skip_ssl_verify))\n\n\ndef build_file(repo_token, service_job_id, service_name, git, source_files, parallel):\n    content = {\n        'service_job_id': service_job_id,\n        'service_name': service_name,\n        'git': git,\n        'source_files': source_files,\n    }\n    if repo_token:\n        content['repo_token'] = repo_token\n    if parallel:\n        content['parallel'] = True\n    return StringIO(json.dumps(content))\n"
  },
  {
    "path": "coveralls/control.py",
    "content": "from coverage.control import Coverage\nfrom coveralls.report import CoverallsReporter\n\n\nclass coveralls(Coverage):\n    def coveralls(self, base_dir, ignore_errors=False, merge_file=None):\n        reporter = CoverallsReporter(self, self.config)\n        reporter.find_file_reporters(None)\n        return reporter.report(base_dir, ignore_errors=ignore_errors, merge_file=merge_file)\n"
  },
  {
    "path": "coveralls/report.py",
    "content": "\nimport os\n\nimport json\n\nfrom coverage.report import Reporter\nfrom coverage.misc import NotPython\n\n\nclass CoverallsReporter(Reporter):\n    def report(self, base_dir, ignore_errors=False, merge_file=None):\n        ret = []\n        for fr in self.file_reporters:\n            try:\n                with open(fr.filename) as fp:\n                    source = fp.readlines()\n            except IOError:\n                if ignore_errors:\n                    continue\n                else:\n                    raise\n            try:\n                analysis = self.coverage._analyze(fr)\n            except NotPython:\n                if ignore_errors:\n                    continue\n                else:\n                    raise\n            coverage_list = [None for _ in source]\n            for lineno, line in enumerate(source):\n                if lineno + 1 in analysis.statements:\n                    coverage_list[lineno] = int(lineno + 1 not in analysis.missing)\n            ret.append({\n                'name': fr.filename.replace(base_dir, '').lstrip(os.sep).replace(os.sep, '/'),\n                'source': ''.join(source).rstrip(),\n                'coverage': coverage_list,\n            })\n\n        # if there's a merge file, load that and append it to the results as well\n        if merge_file:\n            with open(merge_file, 'r') as mfp:\n                data = json.loads(mfp.read())\n                source_files = data.get('source_files')\n                if source_files:\n                    ret.extend(source_files)\n\n        return ret\n"
  },
  {
    "path": "coveralls/repository.py",
    "content": "\nimport sys\nimport os\n\ntry:\n    from subprocess32 import check_output\nexcept ImportError:\n    from subprocess import check_output\n\nFORMAT = '%n'.join(['%H', '%aN', '%ae', '%cN', '%ce', '%s'])\n\n\ndef gitrepo(root):\n    tmpdir = os.getcwd()\n    os.chdir(root)\n    gitlog = check_output(['git', '--no-pager', 'log', '-1', '--pretty=format:%s' % FORMAT], universal_newlines=True).split('\\n', 5)\n    branch = (os.environ.get('CIRCLE_BRANCH') or\n              os.environ.get('TRAVIS_BRANCH', check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD'], universal_newlines=True).strip()))\n    remotes = [x.split() for x in filter(lambda x: x.endswith('(fetch)'), check_output(['git', 'remote', '-v'], universal_newlines=True).strip().splitlines())]\n    os.chdir(tmpdir)\n    return {\n        \"head\": {\n            \"id\": gitlog[0],\n            \"author_name\": gitlog[1],\n            \"author_email\": gitlog[2],\n            \"committer_name\": gitlog[3],\n            \"committer_email\": gitlog[4],\n            \"message\": gitlog[5].strip(),\n        },\n        \"branch\": branch,\n        \"remotes\": [{'name': remote[0], 'url': remote[1]} for remote in remotes]\n    }\n\n\nHGLOG = \"\"\"{node}\n{author|person}\n{author|email}\n{author|person}\n{author|email}\n{desc}\"\"\"\n\n\ndef hgrepo(root):\n    hglog = check_output(['hg', 'log', '-l', '1', '--template=%s' % HGLOG],\n                         universal_newlines=True).split('\\n', 5)\n    branch = (os.environ.get('CIRCLE_BRANCH') or\n              os.environ.get('TRAVIS_BRANCH',\n                             check_output(['hg', 'branch'],\n                                          universal_newlines=True).strip()))\n    remotes = [x.split(' = ') for x in\n               check_output(['hg', 'paths'],\n                            universal_newlines=True).strip().splitlines()]\n    return {\n        'head': {\n            'id': hglog[0],\n            'author_name': hglog[1],\n            'author_email': hglog[2],\n            'committer_name': hglog[3],\n            'committer_email': hglog[4],\n            'message': hglog[5].strip(),\n        },\n        'branch': branch,\n        'remotes': [{\n            'name': remote[0], 'url': remote[1]\n        } for remote in remotes]\n    }\n\n\ndef repo(root):\n    if '.git' in os.listdir(root):\n        return gitrepo(root)\n    if '.hg' in os.listdir(root):\n        return hgrepo(root)\n"
  },
  {
    "path": "coveralls/tests.py",
    "content": "# coding=utf-8\nimport json\nfrom unittest import TestCase\nfrom coverage.plugin import FileReporter\nfrom coverage.python import PythonFileReporter\nfrom coverage.misc import NotPython\nfrom coveralls.control import coveralls\nfrom coveralls.report import CoverallsReporter\nfrom httpretty import HTTPretty, httprettified\nfrom coveralls import api, repository, control, wear\nimport os\n\n\nclass Arguments(object):\n    coveralls_url = 'https://coveralls.io/api/v1/jobs'\n    repo_token = 'abcdef1234569abdcef'\n    service_job_id = '4699301'\n    service_name = 'travi-ci',\n    base_dir = os.path.abspath('python-coveralls-example')\n    data_file = os.path.join(base_dir, '.coverage')\n    config_file = os.path.join(base_dir, '.coveragerc')\n    ignore_errors = False\n    merge_file = os.path.join(base_dir, 'merge.json')\n    parallel = True\n    nogit = False\n    skip_ssl_verify = False\n\n\nGIT_EXP = {\n    'head': {\n        'committer_email': u'24erre@gmail.com',\n        'author_email': u'24erre@gmail.com',\n        'author_name': u'Andrea de Marco',\n        'message': u'Merge pull request #1 from insurancezebra/master',\n        'committer_name': u'Andrea de Marco',\n        'id': u'3e82fd5159b84bebe9bc6c9fd3959f322e6f7098'\n    },\n    'remotes': [\n        {\n            'url': 'https://github.com/z4r/python-coveralls-example.git',\n            'name': 'origin'\n        }\n    ],\n    'branch': 'master'\n}\n\nSOURCE_FILES = [\n    {\n        'source': \"__author__ = 'ademarco'\",\n        'name': 'example/__init__.py',\n        'coverage': [1]\n    },\n    {\n        'source': '# coding=utf-8\\nEUR = \"€\"\\n\\n\\ndef amount(tariff, currency=EUR):\\n    return \\'{0} {1:.2f}\\'.format(currency, float(tariff))',\n        'name': 'example/exencode.py',\n        'coverage': [None, 1, None, None, 1, 1]\n    },\n    {\n        'source': \"def exsum(a, b):\\n    # A comment of a exsum\\n    return a + b\\n\\n\\ndef exdiff(a, b):\\n    return a - b\\n\\n\\nif __name__ == '__main__':\\n    print(exsum(3,4))\\n    print(exdiff(2,2))\",\n        'name': 'example/exmath.py',\n        'coverage': [1, None, 1, None, None, 1, 0, None, None, None, None, None]\n    }\n\n]\n\nMERGE_SOURCE_FILES = [\n    {\n        'source': \"var foo = 'bar';\",\n        'name': \"example/exjs.js\",\n        'coverage': [1]\n    }\n]\n\n\nclass CoverallsTestCase(TestCase):\n    @httprettified\n    def test_wear_ok(self):\n        HTTPretty.register_uri(\n            HTTPretty.POST,\n            'https://coveralls.io/api/v1/jobs',\n            body='{\"message\":\"Job #5.1\",\"url\":\"https://coveralls.io/jobs/5722\"}'\n        )\n        sysexit = wear(Arguments)\n        self.assertEqual(sysexit, 0)\n\n    @httprettified\n    def test_wear_ok(self):\n        HTTPretty.register_uri(\n            HTTPretty.POST,\n            'https://coveralls.io/api/v1/jobs',\n            body='{\"message\":\"Build processing error.\",\"error\":true,\"url\":\"\"}',\n            status=500,\n        )\n        sysexit = wear(Arguments)\n        self.assertEqual(sysexit, 1)\n\n    def test_gitrepo_head(self):\n        git = repository.gitrepo(Arguments.base_dir)\n        self.assertEqual(git['head'], GIT_EXP['head'])\n\n    def test_gitrepo_remotes(self):\n        git = repository.gitrepo(Arguments.base_dir)\n        self.assertEqual(git['remotes'], GIT_EXP['remotes'])\n\n    def test_gitrepo_branch(self):\n        git = repository.gitrepo(Arguments.base_dir)\n        self.assertTrue(git['branch'] in (GIT_EXP['branch'], 'HEAD'))\n\n    def test_coveralls(self):\n        coverage = control.coveralls(data_file=Arguments.data_file, config_file=Arguments.config_file)\n        coverage.load()\n        self.assertEqual(coverage.coveralls(Arguments.base_dir), SOURCE_FILES)\n\n    def test_coveralls_with_merge(self):\n        coverage = control.coveralls(data_file=Arguments.data_file, config_file=Arguments.config_file)\n        coverage.load()\n        self.assertEqual(coverage.coveralls(Arguments.base_dir, merge_file=Arguments.merge_file), SOURCE_FILES + MERGE_SOURCE_FILES)\n\n    @httprettified\n    def test_api(self):\n        HTTPretty.register_uri(\n            HTTPretty.POST,\n            'https://coveralls.io/api/v1/jobs',\n            body='{\"message\":\"Job #5.1 - 100.0% Covered\",\"url\":\"https://coveralls.io/jobs/5722\"}'\n        )\n        response = api.post(\n            url=Arguments.coveralls_url,\n            repo_token=Arguments.repo_token,\n            service_job_id=Arguments.service_job_id,\n            service_name=Arguments.service_name,\n            git=GIT_EXP,\n            source_files=SOURCE_FILES,\n            parallel=Arguments.parallel\n        )\n        self.assertEqual(response.json(), {u'url': u'https://coveralls.io/jobs/5722', u'message': u'Job #5.1 - 100.0% Covered'})\n\n    def test_build_file_eur(self):\n        json_file = api.build_file(\n            repo_token=Arguments.repo_token,\n            service_job_id=Arguments.service_job_id,\n            service_name=Arguments.service_name,\n            git=GIT_EXP,\n            source_files=SOURCE_FILES,\n            parallel=Arguments.parallel\n        )\n        self.assertEqual(\n            json.loads(json_file.read())['source_files'][1]['source'],\n            u'# coding=utf-8\\nEUR = \"€\"\\n\\n\\ndef amount(tariff, currency=EUR):\\n    return \\'{0} {1:.2f}\\'.format(currency, float(tariff))'\n        )\n\n\nclass NotAFileTestCase(TestCase):\n    def setUp(self):\n        coverage = coveralls(data_file=Arguments.data_file, config_file=Arguments.config_file)\n        coverage.load()\n        self.reporter = CoverallsReporter(coverage, coverage.config)\n        self.reporter.find_file_reporters(None)\n        self.reporter.file_reporters.append(FileReporter('NotAFile.py'))\n\n    def test_report_raises(self):\n        self.assertRaises(IOError, self.reporter.report, Arguments.base_dir)\n\n    def test_report_continue(self):\n        self.assertEqual(self.reporter.report(Arguments.base_dir, ignore_errors=True), SOURCE_FILES)\n\n\nclass NotAPythonTestCase(TestCase):\n    def setUp(self):\n        coverage = coveralls(data_file=Arguments.data_file, config_file=Arguments.config_file)\n        coverage.load()\n        self.reporter = CoverallsReporter(coverage, coverage.config)\n        self.reporter.find_file_reporters(None)\n        self.reporter.file_reporters.append(PythonFileReporter('LICENSE', coverage=coverage))\n\n    def test_report_raises(self):\n        self.assertRaises(NotPython, self.reporter.report, Arguments.base_dir)\n\n    def test_report_continue(self):\n        self.assertEqual(self.reporter.report(Arguments.base_dir, ignore_errors=True), SOURCE_FILES)\n"
  },
  {
    "path": "pytest.ini",
    "content": "[pytest]\npep8ignore = E501\n"
  },
  {
    "path": "setup.cfg",
    "content": "[wheel]\nuniversal = 1\n"
  },
  {
    "path": "setup.py",
    "content": "from setuptools import setup, find_packages\nimport sys\nimport os\n\nwd = os.path.dirname(os.path.abspath(__file__))\nos.chdir(wd)\nsys.path.insert(1, wd)\n\nname = 'python-coveralls'\npkg = __import__('coveralls')\n\nauthor, email = pkg.__author__.rsplit(' ', 1)\nemail = email.strip('<>')\n\nversion = pkg.__version__\nclassifiers = pkg.__classifiers__\n\nreadme = open(os.path.join(wd, 'README.rst'), 'r').readlines()\ndescription = readme[1]\nlong_description = ''.join(readme)\n\nreqs = [\n        'PyYAML',\n        'requests',\n        'coverage',\n        'six',\n        ]\n\nif sys.version_info < (2, 7):\n    reqs.append('argparse')\n    reqs.append('subprocess32')\n\nsetup(\n    name=name,\n    version=version,\n    author=author,\n    author_email=email,\n    url='http://github.com/z4r/python-coveralls',\n    maintainer=author,\n    maintainer_email=email,\n    description=description,\n    long_description=long_description,\n    classifiers=classifiers,\n    install_requires=reqs,\n    packages=find_packages(),\n    license='Apache License 2.0',\n    keywords='coveralls.io',\n    entry_points={\n        'console_scripts': [\n            'coveralls = coveralls:wear',\n        ],\n    },\n)\n"
  },
  {
    "path": "test_requirements.txt",
    "content": "pytest\npytest-pep8\npytest-cov\nhttpretty\n"
  }
]