[issue31908] trace module cli does not write cover files

2018-08-11 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset 8fc21c80af73226de875886132e0c32a4ffb32c5 by Berker Peksag (Miss 
Islington (bot)) in branch '3.7':
bpo-26818: Add a test to make sure the bug is fixed (GH-8664)
https://github.com/python/cpython/commit/8fc21c80af73226de875886132e0c32a4ffb32c5


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31908] trace module cli does not write cover files

2018-08-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8219

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31908] trace module cli does not write cover files

2018-08-11 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset c8b0dbc4928a1fe4bd5abebd810b6849374c7af3 by Berker Peksag in 
branch 'master':
bpo-26818: Add a test to make sure the bug is fixed (GH-8664)
https://github.com/python/cpython/commit/c8b0dbc4928a1fe4bd5abebd810b6849374c7af3


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31908] trace module cli does not write cover files

2018-08-03 Thread Berker Peksag


Change by Berker Peksag :


--
pull_requests: +8160

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31908] trace module cli does not write cover files

2018-08-03 Thread Zackery Spytz


Zackery Spytz  added the comment:

This change causes test_trace to leave a trace.cover file in the Lib directory 
(see #34171).

--
nosy: +ZackerySpytz

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31908] trace module cli does not write cover files

2018-04-30 Thread miss-islington

miss-islington  added the comment:


New changeset a607f8b9982ac95bb59f8f61e0a50fc5ae29dc14 by Miss Islington (bot) 
in branch '3.6':
bpo-31908: Fix output of cover files for trace module command-line tool. 
(GH-4205)
https://github.com/python/cpython/commit/a607f8b9982ac95bb59f8f61e0a50fc5ae29dc14


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31908] trace module cli does not write cover files

2018-04-30 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6362

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31908] trace module cli does not write cover files

2018-04-30 Thread miss-islington

miss-islington  added the comment:


New changeset e4eeb6eff12947a55df5eabee36e537cadefbbac by Miss Islington (bot) 
in branch '3.7':
bpo-31908: Fix output of cover files for trace module command-line tool. 
(GH-4205)
https://github.com/python/cpython/commit/e4eeb6eff12947a55df5eabee36e537cadefbbac


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31908] trace module cli does not write cover files

2018-04-30 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6361

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31908] trace module cli does not write cover files

2018-04-30 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6360

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31908] trace module cli does not write cover files

2018-04-30 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 47ab15470d72367694d7758004067313ae022f0e by Serhiy Storchaka 
(Michael Selik) in branch 'master':
bpo-31908: Fix output of cover files for trace module command-line tool. 
(GH-4205)
https://github.com/python/cpython/commit/47ab15470d72367694d7758004067313ae022f0e


--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31908] trace module cli does not write cover files

2017-11-13 Thread Michael Selik

Michael Selik  added the comment:

You're referring to something like this:

+def test_count_and_summary(self):
+name = TESTFN + '.py'
+with open(name, 'w') as fd:
+self.addCleanup(unlink, name)
+fd.write("""\
+x = 1
+y = 2
+
+def f():
+return x + y
+
+for i in range(10):
+f()
+""")
+status, stdout, stderr = assert_python_ok('-m', 'trace', '-cs', name)
+self.assertEqual(status, 0)
+self.assertIn(b'lines   cov%   module   (path)', stdout)
+self.assertIn(('6   100%%   %s   (%s)' % (TESTFN, name)).encode(), 
stdout)
+

?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31908] trace module cli does not write cover files

2017-11-13 Thread Michael Selik

Change by Michael Selik :


--
nosy: +selik

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31908] trace module cli does not write cover files

2017-11-01 Thread Berker Peksag

Berker Peksag  added the comment:

I think the first part of your patch also fixes issue 26818. Could you adapt 
the test there and add a test case for the problem in this issue?

--
nosy: +berker.peksag
versions:  -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31908] trace module cli does not write cover files

2017-10-31 Thread Raymond Hettinger

Change by Raymond Hettinger :


--
nosy: +belopolsky

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31908] trace module cli does not write cover files

2017-10-31 Thread Michael Selik

Michael Selik  added the comment:

Ok, pull request submitted:
https://github.com/python/cpython/pull/4205

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31908] trace module cli does not write cover files

2017-10-31 Thread Michael Selik

Change by Michael Selik :


--
keywords: +patch
pull_requests: +4174
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31908] trace module cli does not write cover files

2017-10-31 Thread Michael Selik

Michael Selik  added the comment:

While writing a patch for this, I noticed the ``lnotab`` parameter seems nearly 
unused. It's a dict, but is only used for its keys.

https://github.com/python/cpython/blob/master/Lib/trace.py#L333

Further, the choice to count unreached lines only when ``show_missing`` was set 
seems inconsistent.

https://github.com/python/cpython/blob/master/Lib/trace.py#L335

https://github.com/python/cpython/blob/master/Lib/trace.py#L280

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31908] trace module cli does not write cover files

2017-10-31 Thread Michael Selik

Michael Selik  added the comment:

The problem appears to be a mistake in commit 
f026dae130bf6f9015c4b212f16852ba4a3f3dec

https://github.com/python/cpython/commit/f026dae130bf6f9015c4b212f16852ba4a3f3dec

This made the writing of cover files conditional on ``show_missing`` which is 
the option to mark lines which weren't executed with several angle brackets 
">".

https://github.com/python/cpython/blob/3.5/Lib/trace.py#L326

mike on mac in ~/
$ python -m trace --count foo.py
hello

mike on mac in ~/
$ ls *.cover
ls: *.cover: No such file or directory

mike on mac in ~/
$ python -m trace --count -m foo.py
hello

mike on mac in ~/
$ ls *.cover
-rw-r--r--  1 mike  staff22B Oct 31 15:40 foo.cover

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31908] trace module cli does not write cover files

2017-10-30 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

It worked in Python 3.4, but not afterwards.

--
components: +Library (Lib)
nosy: +rhettinger
versions: +Python 3.5, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31908] trace module cli does not write cover files

2017-10-30 Thread Michael Selik

New submission from Michael Selik :

The trace module command-line utility doesn't write cover files. I've noticed 
this issue for some years now. It works fine in Python 2. When using Python 3, 
no ".cover" files are written, regardless of how "--coverdir" is specified.

mike on macbook in ~/
$ echo 'print("hello")' > foo.py

mike on macbook in ~/
$ python -m trace --count foo.py
hello

mike on macbook in ~/
$ ls *.cover
ls: *.cover: No such file or directory


My apologies if this is a duplicate bug. I searched the tracker and Google for 
a while, but couldn't find a relevant issue.

--
messages: 305268
nosy: Michael Selik
priority: normal
severity: normal
status: open
title: trace module cli does not write cover files
type: behavior
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com