question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Output: final newline / "old line"

See original GitHub issue

With the following output there are some problems:

  1. what does old line mean? Should be removed or replaced with some more descriptive message (in verbose mode only?)
  2. it is missing a final newline - as you can see since Zsh prints timing information in the same line
  3. it displays “1484 out of 133”, i.e. the count / total appears to be off. It would be good to see what it refers to (mutations? files?)
% mutmut --use-coverage --runner 'python -m pytest testing/test_collection.py' src/_pytest/nodes.py
Running tests without mutations... Done
Using coverage data from .coverage file
--- starting mutation ---
FAILED: mutmut src/_pytest/nodes.py --apply --mutation "        return self.fspath, None, \"\"⤑0"
…
old line
FAILED: mutmut src/_pytest/nodes.py --apply --mutation "            cache = self.config.__dict__.setdefault(\"_bestrelpathcache\", {})⤑0"
FAILED: mutmut src/_pytest/nodes.py --apply --mutation "                fspath = cache[location[0]]⤑0"                  
FAILED: mutmut src/_pytest/nodes.py --apply --mutation "                fspath = cache[location[0]]⤑1"
FAILED: mutmut src/_pytest/nodes.py --apply --mutation "                fspath = self.session.fspath.bestrelpath(location[0])⤑0"
FAILED: mutmut src/_pytest/nodes.py --apply --mutation "                fspath = self.session.fspath.bestrelpath(location[0])⤑1"
FAILED: mutmut src/_pytest/nodes.py --apply --mutation "                cache[location[0]] = fspath⤑0"
FAILED: mutmut src/_pytest/nodes.py --apply --mutation "                cache[location[0]] = fspath⤑1"
FAILED: mutmut src/_pytest/nodes.py --apply --mutation "            location = (fspath, location[1], str(location[2]))⤑0"
1484 out of 133  (src/_pytest/nodes.py             self._location = location⤑0)                         mutmut --use-coverage --runner 'python -m pytest testing/test_collection.py'   341.91s user 16.20s system 98% cpu 6:02.87 total

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
boxedcommented, Nov 18, 2018
  1. Probably. It seems a bit messy due to the way I handle the dict synonyms option though, I might just only support that via the config file or maybe store it in the cache? Hmm… I’ll have to think about it a bit, but in general it seems a lot nicer, I just didn’t find it in the docs when I was implementing this.
  2. I guess. You can just pull up another terminal and print the results during execution.
  3. I see you figure it out 😛
  4. Name? What do you mean? I don’t really have names and I don’t see how that would help much if I did…
  5. Embarrasing! I’ll fix that in 1.0.1 😛

I’ll fix the missing newline at the end in 1.0.1 too.

0reactions
boxedcommented, Mar 1, 2019

Fixed again 😛 Thanks for the bug report.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why should text files end with a newline? - Stack Overflow
The first line (like all lines) needs no \n to start it. The last line (like all lines) needs an \n to end...
Read more >
How do I remove the newline from the last line in a file in order ...
Though, you can remove newline character from all lines by using tr -d '\n' :
Read more >
Line Formats (Comparing and Merging Files) - GNU.org
The first character of output is ' - ' for deleted lines, ' | ' for added lines, and a space for unchanged...
Read more >
Bash: how to know if the last command's output ends with a ...
If the last output ends without a newline, you will get: $ echo -n 'abc' abc% $. Where the % uses inverted background/foreground....
Read more >
Overwrite Previously Printed Lines | by Thijmen Dam - ITNEXT
Print another line, but because the cursor is now at the beginning of the previous line, the new output will be printed on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found