Some Open/Read tests are failing.
See original GitHub issuewith open('compression/du cote de chez swann.txt', 'rb') as f:
assert len(f.read()) == 1_056_294
with open('compression/du cote de chez swann.txt', 'r') as f:
assert len(f.readlines()) == 2118
with open('compression/du cote de chez swann.txt', 'r') as f:
counter = 0
for line in f:
counter += 1
assert counter == 2118
Output
Traceback (most recent call last):
AssertionError: AssertionError
<completed in 313.00 ms (FAILED)>
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
Unit testing of class using File.OpenRead() - Stack Overflow
Currently, I am creating a file just to create a FileStream ... Of course, the tests are regularly failing with a IOException because...
Read more >Problems with .NET unit testing - Rider Support | JetBrains
Go to the directory with dotnet executable via terminal. Run "dotnet --version" command.
Read more >Unit tests fail in Test Explorer but runs without any problem in ...
Miroslav, I'm asking if the tests that are failing when you "Run All" pass if you try to run them under the debugger....
Read more >Mocking System.IO filesystem in unit tests in ASP.NET Core
Let's see now how to write some simple unit tests for this controller with Moq package and Xunit. using Moq; using SampleApi.Controllers; using ......
Read more >dotnet test command - .NET CLI | Microsoft Learn
The dotnet test command is used to execute unit tests in a given project. ... otherwise if any test fails, it returns 1....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh, I see now. The difference between 1_054_176 and 1_056_294 is the number of lines in the text, 2118. It’s a question of line feed being converted from 2 characters
\r\n
to 1 character\n
. I have modified the test to accept both values.Sorry for the last answer, I am almost full time on Pattern Matching these days.
I have just changed the test to accept 2117 as well, although I can’t reproduce the bug (CPython also gives 2118).