9

Use `pip list`'s JSON output for `installed_distributions` by woodruffw · Pull R...

 2 years ago
source link: https://github.com/di/pip-api/pull/93
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Copy link

Contributor

Author

woodruffw commented on Sep 7, 2021

Unrelated CI failure?

tests/test_pep650.py .....E..                                            [ 90%]
tests/test_tests.py ...                                                  [ 97%]
tests/test_version.py .                                                  [100%]

==================================== ERRORS ====================================
__ ERROR at setup of test_invoke_uninstall[requirements.txt-requirements.txt] __

tmpdir = local('/tmp/pytest-of-runner/pytest-0/test_invoke_uninstall_requirem0')

    @pytest.fixture(autouse=True)
    def isolate(tmpdir):
        """
        Isolate our tests so that things like global configuration files and the
        like do not affect our test results.
        We use an autouse function scoped fixture because we want to ensure that
        every test has it's own isolated home directory.
        """
    
        # Create a directory to use as our home location.
        home_dir = os.path.join(str(tmpdir), "home")
>       os.makedirs(home_dir)

tests/conftest.py:69: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = '/tmp/pytest-of-runner/pytest-0/test_invoke_uninstall_requirem0/home'
mode = 511, exist_ok = False

    def makedirs(name, mode=0o777, exist_ok=False):
        """makedirs(name [, mode=0o777][, exist_ok=False])
    
        Super-mkdir; create a leaf directory and all intermediate ones.  Works like
        mkdir, except that any intermediate path segment (not just the rightmost)
        will be created if it does not exist. If the target directory already
        exists, raise an OSError if exist_ok is False. Otherwise no exception is
        raised.  This is recursive.
    
        """
        head, tail = path.split(name)
        if not tail:
            head, tail = path.split(head)
        if head and tail and not path.exists(head):
            try:
                makedirs(head, mode, exist_ok)
            except FileExistsError:
                # Defeats race condition when another thread created the path
                pass
            cdir = curdir
            if isinstance(tail, bytes):
                cdir = bytes(curdir, 'ASCII')
            if tail == cdir:           # xxx/newdir/. exists if xxx/newdir exists
                return
        try:
>           mkdir(name, mode)
E           FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-runner/pytest-0/test_invoke_uninstall_requirem0/home'

/opt/hostedtoolcache/Python/3.6.14/x64/lib/python3.6/os.py:220: FileExistsError

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK