-
Notifications
You must be signed in to change notification settings - Fork 92
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
BytesWarning: Comparison between bytes and string #651
Comments
Thanks, but your change would defy the purpose of the line, which is to check both Also, there are a few more such warnings in the code - I will have a look at all of them, but that has not a high priority, as the code works fine despite the warning. |
@mrbean-bremen Thanks |
- make bytes warning an error in test run - see pytest-dev#651
- make bytes warning an error in test run - see #651
Describe the bug
When using python with '-b' option it raises warning BytesWarning: Comparison between bytes and string.
How To Reproduce
Your environment
https://github.com/jmcgeheeiv/pyfakefs/blob/master/pyfakefs/fake_filesystem.py#L3204
I have fixed this issue with changing line
if target_directory in (b'.', u'.'):
to
if target_directory in (b'.'.decode('utf-8'), u'.'):
The text was updated successfully, but these errors were encountered: