Пример #1
0
    def test_get_data_files(self):
        self.assertTrue(hasattr(setupextras, 'get_data_files'))
        self.assertTrue(callable(setupextras.get_data_files))

        result = setupextras.get_data_files()

        self.assertDeepEqual(result, [])

        foo_package_path = helper.fixture_path()

        result = setupextras.get_data_files()

        self.assertDeepEqual(result, [])

        foo_package_path = helper.fixture_path('foo')

        result = setupextras.get_data_files(foo_package_path)

        import json

        expected_result = list(
            map(
                lambda item:
                ((item[0].replace('<root>', helper.root_path()), item[1])), [
                    ('<root>', ['/']),
                    ('<root>/setupextras', ['/']),
                    ('<root>/setupextras/tests', ['/']),
                    ('<root>/setupextras/tests/__fixtures__', ['/']),
                    ('<root>/setupextras/tests/__fixtures__/py-foo', ['/']),
                    ('<root>/setupextras/tests/__fixtures__/py-foo/bin', ['/'
                                                                          ]),
                    ('<root>/setupextras/tests/__fixtures__/py-foo/foo', ['/'
                                                                          ]),
                    ('<root>/setupextras/tests/__fixtures__/py-foo/foo/tests',
                     ['/']),
                    ('<root>/setupextras/tests/__fixtures__/py-foo/foo/tests/__fixtures__',
                     ['/']),
                    ('<root>/setupextras/tests/__fixtures__/py-foo/foo/tests/__fixtures__/foo',
                     ['/']),
                    ('<root>/examples', ['/']),
                ]))

        self.assertDeepEqual(result, expected_result)
Пример #2
0
    'database',
    'server',
    'uri',
    'url',
    'serializer',
    'deserializer',
    'packer',
    'unpacker',
    'stringifier',
    'parser',
    'multi-host',
]

packages = setupextras.get_packages()
data_files = setupextras.get_data_files(['*.*'],
                                        os.path.join(name, 'tests',
                                                     '__fixtures__'))
requirements = setupextras.get_requirements()
readme = setupextras.get_readme()

config = {
    'name':
    name,
    'version':
    version,
    'description': (description),
    'keywords':
    keywords,
    'author':
    'Jonas Grimfelt',
    'author_email':