-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
What steps will reproduce the problem?
1. Using pyfakefs, run os.chown or a variant (e.g. os.lchown), passing a
non-integer value as an argument
What is the expected output? What do you see instead?
This should fail with a TypeError. Here is the same steps run without pyfakefs:
Python 2.7.8 (default, Sep 24 2014, 18:26:21)
[GCC 4.9.1 20140903 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.chown('/tmp/foo', 'foobar', -1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: an integer is required
But pyfakefs's chown succeeds. Here is os.stat output after chown:
posix.stat_result(st_mode=33188, st_ino=None, st_dev=None, st_nlink=None,
st_uid='baz', st_gid=None, st_size=0, st_atime=1414437220, st_mtime=1414437220,
st_ctime=1414437220)
Original issue reported on code.google.com by James.G....@gmail.com on 27 Oct 2014 at 7:25