Beispiel #1
0
    def test_setup(self, setup_func):

        # setup file has correct version?
        from setup import get_version
        setup_version = get_version()
        self.assertEqual(setup_version, chromepdf_version)

        # setup has correct long description?
        from setup import get_long_description
        setup_long_description = get_long_description()
        readme_path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'README.md')
        with open(readme_path, 'r') as f:
            readme_contents = f.read()
        self.assertGreater(len(readme_contents), 1)
        self.assertEqual(setup_long_description, readme_contents)
Beispiel #2
0
 def test_long_description(self):
     self.assertTrue(bool(rst2html(get_long_description())))
Beispiel #3
0
# Licensed under the EUPL (the 'Licence');
# You may not use this work except in compliance with the Licence.
# You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl

import os
from setup import (name, proj_ver, get_long_description, url, download_url,
                   project_urls)

if __name__ == '__main__':
    from setuptools import setup, find_packages
    from micropython.sdist_upip import sdist

    long_description = ''
    if os.environ.get('ENABLE_SETUP_LONG_DESCRIPTION') == 'TRUE':
        try:
            long_description = get_long_description()
            print('LONG DESCRIPTION ENABLED!')
        except Exception as ex:
            print('LONG DESCRIPTION ERROR:\n %r', ex)

    # noinspection PyTypeChecker
    setup(
        name='micropython-%s' % name,
        version=proj_ver,
        packages=find_packages(exclude=[
            'doc', 'doc.*', 'tests', 'tests.*', 'examples', 'examples.*',
            'micropython', 'micropython.*', 'schedula.ext', 'schedula.ext.*',
            'schedula.utils.io', 'schedula.utils.io.*', 'schedula.utils.drw',
            'schedula.utils.drw.*', 'schedula.utils.web',
            'schedula.utils.web.*', 'schedula.utils.des',
            'schedula.utils.des.*', 'requirements', 'binder', 'bin'
Beispiel #4
0
def test_get_long_description():
    description = get_long_description('README.md')
    assert description and type(description) is str
Beispiel #5
0
 def test_long_description(self):
     self.assertTrue(bool(rst2html(get_long_description())))