Exemplo n.º 1
0
#!/usr/bin/env python3

# Start ignoring PyImportSortBear as imports below may yield syntax errors
from bears import assert_supported_version

assert_supported_version()
# Stop ignoring

import locale
import sys
from os.path import exists
from shutil import copyfileobj
from subprocess import call
from urllib.request import urlopen

import setuptools.command.build_py
from bears import Constants
from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand

try:
    locale.getlocale()
except (ValueError, UnicodeError):
    locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')


def download(url, filename, overwrite=False):
    """
    Downloads the given URL to the given filename. If the file exists, it won't
    be downloaded.
Exemplo n.º 2
0
#!/usr/bin/env python3

import locale
import sys
from os.path import exists
from shutil import copyfileobj
from urllib.request import urlopen

# Start ignoring PyImportSortBear as imports below may yield syntax errors
from bears import assert_supported_version

assert_supported_version()
# Stop ignoring

import setuptools.command.build_py
from bears import Constants
from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand

try:
    locale.getlocale()
except (ValueError, UnicodeError):
    locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')


def download(url, filename, overwrite=False):
    """
    Downloads the given URL to the given filename. If the file exists, it won't
    be downloaded.

    :param url:       A URL to download.
Exemplo n.º 3
0
 def test_python_version_34(self):
     assert_supported_version()
Exemplo n.º 4
0
    def test_python_version_33(self):
        with self.assertRaises(SystemExit) as cm:
            assert_supported_version()

        self.assertEqual(cm.exception.code, 4)
Exemplo n.º 5
0
 def test_python_version_34(self):
     assert_supported_version()
Exemplo n.º 6
0
    def test_python_version_33(self):
        with self.assertRaises(SystemExit) as cm:
            assert_supported_version()

        self.assertEqual(cm.exception.code, 4)