Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

One test fails on PyPy #39

@msabramo

Description

@msabramo

I think it has to do with the fact that sys.executable == 'pypy' instead of 'python'. At some point it tries to invoke ipython inside a virtualenv but the symlink is not there.

marca@marca-mac:~/dev/git-repos/terrarium$ tox -e pypy -- tests.tests:TestTerrarium.test_install_storage_dir_archive_extracted
GLOB sdist-make: /Users/marca/dev/git-repos/terrarium/setup.py
pypy inst-nodeps: /Users/marca/dev/git-repos/terrarium/.tox/dist/terrarium-1.0.0rc5-dev.zip
pypy runtests: commands[0]
total 89720
-rw-r--r--  1 marca  staff      2318 Jul 16 12:44 activate
-rw-r--r--  1 marca  staff      1374 Jul 16 12:44 activate.csh
-rw-r--r--  1 marca  staff      2513 Jul 16 12:44 activate.fish
-rw-r--r--  1 marca  staff      1129 Jul 16 12:44 activate_this.py
-rwxr-xr-x  1 marca  staff       394 Jul 16 12:44 easy_install
-rwxr-xr-x  1 marca  staff       402 Jul 16 12:44 easy_install-2.7
-rwxr-xr-x  1 marca  staff       352 Jul 16 12:44 pip
-rwxr-xr-x  1 marca  staff       360 Jul 16 12:44 pip-2.7
-rwxr-xr-x  1 marca  staff  45769052 Jul 16 12:44 pypy
lrwxr-xr-x  1 marca  staff         4 Jul 16 12:44 python -> pypy
lrwxr-xr-x  1 marca  staff         4 Jul 16 12:44 python2 -> pypy
lrwxr-xr-x  1 marca  staff         4 Jul 16 12:44 python2.7 -> pypy
-rwxr--r--  1 marca  staff    116870 Jul 16 12:44 terrarium_bootstrap.py
> /Users/marca/dev/git-repos/terrarium/tests/tests.py(102)_run()
    101             import ipdb; ipdb.set_trace()
--> 102         result = subprocess.Popen(params, **kwargs)
    103         output = result.communicate()

ipdb> c
Executing "terrarium --target /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB --no-backup --storage-dir /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_storage-5bEe8C  install /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_req-iZAZpk"

Copying environment from /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_storage-5bEe8C (this may take time) ...
Extracting terrarium bundle
Moving old environment out of the way
Deleting old environment
Terrarium is finished
Executing "/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB/bin/python -c "import test_requirement""
total 89712
-rw-r--r--  1 marca  staff      2318 Jul 16 12:50 activate
-rw-r--r--  1 marca  staff      1374 Jul 16 12:50 activate.csh
-rw-r--r--  1 marca  staff      2513 Jul 16 12:50 activate.fish
-rw-r--r--  1 marca  staff      1129 Jul 16 12:43 activate_this.py
-rwxr-xr-x  1 marca  staff       394 Jul 16 12:50 easy_install
-rwxr-xr-x  1 marca  staff       402 Jul 16 12:50 easy_install-2.7
-rwxr-xr-x  1 marca  staff       352 Jul 16 12:50 pip
-rwxr-xr-x  1 marca  staff       360 Jul 16 12:50 pip-2.7
-rwxr-xr-x  1 marca  staff  45769052 Jul 16 12:43 pypy
lrwxr-xr-x  1 marca  staff         4 Jul 16 12:43 python2 -> pypy
lrwxr-xr-x  1 marca  staff         4 Jul 16 12:43 python2.7 -> pypy
-rwxr--r--  1 marca  staff    117064 Jul 16 12:50 terrarium_bootstrap.py
> /Users/marca/dev/git-repos/terrarium/tests/tests.py(102)_run()
    101             import ipdb; ipdb.set_trace()
--> 102         result = subprocess.Popen(params, **kwargs)
    103         output = result.communicate()

Note that now, there's no python symlink so this is going to fail...

ipdb> bt
...
  /Users/marca/dev/git-repos/terrarium/tests/tests.py(421)test_install_storage_dir_archive_extracted()
    419
    420         actual = self._can_import_requirements(
--> 421             'test_requirement',  # Should exist now
    422         )
    423         expected = ['test_requirement']

  /Users/marca/dev/git-repos/terrarium/tests/tests.py(195)_can_import_requirements()
    193         for r in requirements:
    194             output, return_code = self._python(
--> 195                 '-c "import %s"' % r
    196             )
    197             if return_code == 0:

  /Users/marca/dev/git-repos/terrarium/tests/tests.py(125)_python()
    123             '%s %s' % (
    124                 self.python,
--> 125                 command,
    126             )
    127         )

> /Users/marca/dev/git-repos/terrarium/tests/tests.py(102)_run()
    100             os.system("ls -l %s" % _dir)
    101             import ipdb; ipdb.set_trace()
--> 102         result = subprocess.Popen(params, **kwargs)
    103         output = result.communicate()
    104         return output, result.returncode

ipdb> c
E
======================================================================
ERROR: test_install_storage_dir_archive_extracted (tests.tests.TestTerrarium)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/marca/dev/git-repos/terrarium/tests/tests.py", line 421, in test_install_storage_dir_archive_extracted
    'test_requirement',  # Should exist now
  File "/Users/marca/dev/git-repos/terrarium/tests/tests.py", line 195, in _can_import_requirements
    '-c "import %s"' % r
  File "/Users/marca/dev/git-repos/terrarium/tests/tests.py", line 125, in _python
    command,
  File "/Users/marca/dev/git-repos/terrarium/tests/tests.py", line 102, in _run
    result = subprocess.Popen(params, **kwargs)
  File "/Users/marca/opt/pypy-2.0-beta1/lib-python/2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/Users/marca/opt/pypy-2.0-beta1/lib-python/2.7/subprocess.py", line 1253, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
-------------------- >> begin captured stdout << ---------------------
Executing "terrarium --target /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB --storage-dir /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_storage-5bEe8C  install /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_req-iZAZpk"
Using real prefix '/Users/marca/opt/pypy-2.0-beta1'
Path not in prefix '/Users/marca/dev/git-repos/terrarium/.tox/pypy/include' '/Users/marca/opt/pypy-2.0-beta1'
New pypy executable in /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB/bin/pypy
Installing distribute...........................................................................................................................................................................................................................done.
Installing pip................done.
Unpacking ./tests/fixtures/test_requirement
  Running setup.py egg_info for package from file:///Users/marca/dev/git-repos/terrarium/tests/fixtures/test_requirement

Installing collected packages: test-requirement
  Running setup.py install for test-requirement

Successfully installed test-requirement
Cleaning up...
Script /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB/bin/activate.csh cannot be made relative (it's not a normal script that starts with #!/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB/bin/python)
Script /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB/bin/activate.fish cannot be made relative (it's not a normal script that starts with #!/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB/bin/python)
Script /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB/bin/easy_install cannot be made relative (it's not a normal script that starts with #!/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB/bin/python)
Script /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB/bin/easy_install-2.7 cannot be made relative (it's not a normal script that starts with #!/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB/bin/python)
Script /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB/bin/pip cannot be made relative (it's not a normal script that starts with #!/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB/bin/python)
Script /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB/bin/pip-2.7 cannot be made relative (it's not a normal script that starts with #!/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB/bin/python)

Download archive failed
Building new environment
Copying bootstrap script to new environment
Copying environment to storage directory
Building terrarium bundle
Archive copied to storage directory
Terrarium is finished
Executing "terrarium   key /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_req-iZAZpk"
Executing "terrarium --target /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB --no-backup  install /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_req-iZAZpk"
Using real prefix '/Users/marca/opt/pypy-2.0-beta1'
Path not in prefix '/Users/marca/dev/git-repos/terrarium/.tox/pypy/include' '/Users/marca/opt/pypy-2.0-beta1'
New pypy executable in /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB.AWkl3p/bin/pypy
Installing distribute...........................................................................................................................................................................................................................done.
Installing pip................done.
You must give at least one requirement to install (see "pip help install")
Script /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB.AWkl3p/bin/activate.csh cannot be made relative (it's not a normal script that starts with #!/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB.AWkl3p/bin/python)
Script /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB.AWkl3p/bin/activate.fish cannot be made relative (it's not a normal script that starts with #!/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB.AWkl3p/bin/python)
Script /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB.AWkl3p/bin/easy_install cannot be made relative (it's not a normal script that starts with #!/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB.AWkl3p/bin/python)
Script /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB.AWkl3p/bin/easy_install-2.7 cannot be made relative (it's not a normal script that starts with #!/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB.AWkl3p/bin/python)
Script /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB.AWkl3p/bin/pip cannot be made relative (it's not a normal script that starts with #!/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB.AWkl3p/bin/python)
Script /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB.AWkl3p/bin/pip-2.7 cannot be made relative (it's not a normal script that starts with #!/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB.AWkl3p/bin/python)

Building new environment
Copying bootstrap script to new environment
Moving old environment out of the way
Deleting old environment
Terrarium is finished
Executing "/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/test_terrarium_target-HdJKhB/bin/python -c "import test_requirement""

--------------------- >> end captured stdout << ----------------------

----------------------------------------------------------------------
Ran 1 test in 434.251s

FAILED (errors=1)
ERROR: InvocationError: '/Users/marca/dev/git-repos/terrarium/.tox/pypy/bin/nosetests tests.tests:TestTerrarium.test_install_storage_dir_archive_extracted'
_________________________________________________________________________________________________________________________________________________________ summary __________________________________________________________________________________________________________________________________________________________
ERROR:   pypy: commands failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions