[issue44102] mock_open does not support the use of 'seek()'

2021-05-10 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: See also https://bugs.python.org/issue25690 . https://github.com/nivbend/mock-open has support for seek. As stated in the other issue supporting all operations of a filesystem might add more complexity. -- components: +Library (Lib) nosy:

[issue44102] mock_open does not support the use of 'seek()'

2021-05-10 Thread Niko
New submission from Niko : Using 'mock_open' to unit test a code that uses the 'seek()' function for the file object does not work. This would be a great addition for mock_open functionality as this use case happens occasionally. Test file contains: def test_one(self): with patch("builtin