question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

fake_pathlib's resolve() does not reproduce error when path has file ancestor

See original GitHub issue

Under Python 3.6:

>>> p = pathlib.Path('/path/to/file/this can not exist')
>>> p.resolve()
Traceback (most recent call last):
  ...
NotADirectoryError: [Errno 20] Not a directory: '/path/to/file/this can not exist'

pyfakefs.fake_pathlib.FakePath.resolve() does not raise an exception.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
mrbean-bremencommented, Nov 28, 2016

Thanks for the report - you may be the first user of fake_pathlib so far, so we are certainly happy to get any feedback. I will have a look into this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

fake_pathlib's resolve() does not reproduce error when path has file ...
Under Python 3.6: >>> p = pathlib.Path('/path/to/file/this can not exist') >>> p.resolve() Traceback (most recent call last): .
Read more >
Error: Unable to find ancestor directory of audited object - IBM
Symptom. If a makefile writes a file in a view-private directory and then moves the directory to another path, Clearmake is not correctly ......
Read more >
How do I resolve this pathlib _file_ name error in Jupyter?
I found the answer to my own question from user "peng" in this stack: path problem : NameError: name '__file__' is not defined....
Read more >
How to resolve the unable to copy files as destination path ...
Hi Everyone,. Error Description : Unable to copy file(s) as the destination path '' does not exist. This is the error, whenever runs...
Read more >
path_resolution - how a pathname is resolved to a file
Pathnames not starting with a '/' are called relative pathnames. Step 2: walk along the path Set the current lookup directory to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found