Skip to content

py.path.local('/').join('foo') should return '/foo' not '//foo' #127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

AndreasLoow
Copy link
Contributor

See #84!

@RonnyPfannschmidt
Copy link
Member

RonnyPfannschmidt commented Jun 24, 2017

@AndreasLoow lol, just as i decided to just do the same - i'd much prefer to merge yours however

@RonnyPfannschmidt
Copy link
Member

im most curious as to why the build fails now

@AndreasLoow
Copy link
Contributor Author

Not sure ... it fails on the following test:

_____________________ TestPOSIXLocalPath.test_join_to_root _____________________
self = <test_local.TestPOSIXLocalPath object at 0x7f0435c9cc88>
path1 = local('/tmp/pytest-of-travis/pytest-0/test_constructor_equality0')
    def test_join_to_root(self, path1):
        root = path1.parts()[0]
        assert len(str(root)) == 1
>       assert str(root.join('a')) == '/a'
E       assert '//a' == '/a'
E         - //a
E         ? -
E         + /a

But when I try it locally it works:

$ python
Python 3.6.1 (default, Mar 29 2017, 18:15:54)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from py.path import local
>>> path1 = local('/tmp/pytest-of-travis/pytest-0/test_constructor_equality0')
>>> root = path1.parts()[0]
>>> root
local('/')
>>> assert len(str(root)) == 1
>>> root.join('a')
local('/a')
>>> assert str(root.join('a')) == '/a'

@RonnyPfannschmidt
Copy link
Member

@AndreasLoow i determined its the issue i found in #130 - tox-dev/tox#536 is taking a toll on pylib

@RonnyPfannschmidt RonnyPfannschmidt merged commit 9bfb185 into pytest-dev:master Jun 25, 2017
@RonnyPfannschmidt
Copy link
Member

merged as the error is urelated and stems from the tox issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants