Skip to content
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

pytest-shutil uses /bin in tests which fails on Fedora hosts #67

Closed
nirik opened this issue Aug 15, 2017 · 4 comments
Closed

pytest-shutil uses /bin in tests which fails on Fedora hosts #67

nirik opened this issue Aug 15, 2017 · 4 comments

Comments

@nirik
Copy link

nirik commented Aug 15, 2017

The tests for pytest-shutil uses a test where it does a chdir to /bin then checks to make sure it's in /bin.

Unfortunately this fails on Fedora hosts as /bin is a link to /usr/bin, so the test shows it's in the wrong dir:

=================================== FAILURES ===================================
__________________________________ test_chdir __________________________________
def test_chdir():
here = os.getcwd()
with cmdline.chdir('/bin'):

      assert os.getcwd() == '/bin'

E AssertionError: assert '/usr/bin' == '/bin'
E - /usr/bin
E + /bin
tests/integration/test_cmdline_integration.py:9: AssertionError

I suggest using /etc ? Doing that here locally makes the tests pass...

@bmoscon
Copy link
Collaborator

bmoscon commented Aug 16, 2017

server-fixtures uses __init__.py to define paths, maybe we should do that for this fixture so on different Linux flavors it can be changed

@bmoscon
Copy link
Collaborator

bmoscon commented Aug 16, 2017

@eeaston

@eeaston
Copy link
Collaborator

eeaston commented Nov 17, 2017

I'll update the test to use a tempdir instead.

@eeaston
Copy link
Collaborator

eeaston commented Mar 8, 2018

Fixed in 932be1d, thanks for raising!

@eeaston eeaston closed this as completed Mar 8, 2018
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

No branches or pull requests

3 participants