Change by Addons Zz :
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue35852>
___
___
Python-bugs-
New submission from Addons Zz :
When generating the file on Windows by running
```
python test/test_profile.py -r
```
The file has its line ending converted from LF to CRLF, creating noise on the
git diff.
--
components: Library (Lib), Tests
messages: 334529
nosy: addons_zz
priority
New submission from Addons Zz :
Instead of doing:
```
10056.0 function calls in 0.006 seconds
Ordered by: internal time
ncalls tottime percall cumtime percall filename:lineno(function)
1.00.0020.0020.0060.006
benchmark_tests.py:121
Addons Zz added the comment:
I applied the patch from https://bugs.python.org/file44679 and it fixed the
issue for this example using the unittest module:
```python
import unittest
class StdErrUnitTests(unittest.TestCase):
def test_function_name(self):
expected
Addons Zz added the comment:
* Correction
```python
import difflib
def bugged_diff(expected, actual):
expected = expected.splitlines( 1 )
actual = actual.splitlines( 1 )
# diff = difflib.ndiff( expected, actual )
if expected != actual:
diff = difflib.context_diff
Addons Zz added the comment:
The issue is also reproducible, by directly using difflib:
```python
import difflib
def bugged_diff(expected, actual):
expected = expected.splitlines( 1 )
actual = actual.splitlines( 1 )
# diff = difflib.ndiff( expected, actual )
if expected
New submission from Addons Zz :
Create this program and run with `Python 3.6.3`:
```python
import unittest
class StdErrUnitTests(unittest.TestCase):
def test_function_name(self):
expected = "testing.main_unit_tests.test_dictionaryBasicLogging:416 -
diction