Coverage weirdness with nose

367 views
Skip to first unread message

Chris Withers

unread,
Jan 16, 2012, 2:11:15 PM1/16/12
to n...@nedbatchelder.com, testing-...@lists.idyll.org, nose-...@googlegroups.com
Hi Ned,

Having some truly weird behaviour with coverage and the tests for my
testfixtures package.

When I run the tests as follows:

$ bin/nosetests --with-xcoverage --xcoverage-file=$PWD/coverage.xml

...I get plenty of coverage output, but none of it is for the
testfixtures package itself, even though all its tests run successfully.

If I run as follows:

$ bin/nosetests --with-xcoverage --xcoverage-file=$PWD/coverage.xml
--cover-package=testfixtures

...I get the output in the PS of this mail.

Problems appear to be:

- coverage info is still being reported for the manuel, nose,
nose_fixes, nosexcover, zope.component, zope.event and zope.interface
packages. Why is that?

- coverage info is being collected for the tests folder of the
testfixtures package, which just contains the unit tests. How do I tell
coverage-via-nose not to include anything in testfixtures.tests?

- because of the above, there's lots of problems with python examples in
doctests run by manuel not having any source. One of these appears to
blow up the report generation, which seems unintentional?

Any help gratefully appreciated!

cheers,

Chris

PS: The output:

Name
Stmts Miss Cover Missing
----------------------------------------------------------------------------------------------------------------------------------------
/Users/chris/buildout-eggs/manuel-1.5.0-py2.6.egg/manuel/__init__
244 31 87% 34, 61-65, 75,
80-82, 137, 165-167, 202, 228, 258, 292-305, 311, 314, 341, 344, 347
/Users/chris/buildout-eggs/manuel-1.5.0-py2.6.egg/manuel/capture
58 3 95% 56, 61, 73
/Users/chris/buildout-eggs/manuel-1.5.0-py2.6.egg/manuel/codeblock
24 8 67% 17-23, 36
/Users/chris/buildout-eggs/manuel-1.5.0-py2.6.egg/manuel/doctest
62 2 97% 67-68
/Users/chris/buildout-eggs/manuel-1.5.0-py2.6.egg/manuel/testing
103 29 72% 16, 42-43,
47-50, 53, 56-59, 76, 89, 102, 106-127, 166-167, 175
/Users/chris/buildout-eggs/mock-0.8.0rc2-py2.6.egg/mock
1170 748 36% 40-43, 47-55,
59-61, 65-67, 71-73, 77-79, 85-86, 96-98, 110-111, 123, 144-171,
175-206, 210-223, 227-235, 239-243, 249, 255-267, 274-300, 322-332,
336-375, 388, 399, 414-416, 439, 445, 454-465, 479-493, 532-533, 550,
563-568, 577, 584-589, 600, 612, 626, 639, 647, 654-666, 678-688, 693,
695-696, 698, 706, 715-719, 739, 745, 752, 762-765, 778-786, 794-818,
822-829, 833-834, 838-844, 854-855, 858-859, 865-870, 883-900, 911-914,
929-932, 942-951, 1027, 1033-1041, 1045, 1108-1112, 1116-1123, 1128,
1139-1160, 1164-1173, 1177-1179, 1183-1193, 1197-1240, 1244-1261,
1266-1355, 1360-1376, 1384-1390, 1408-1409, 1432-1456, 1533-1534,
1566-1573, 1577-1587, 1591-1598, 1603, 1607-1629, 1633-1642, 1647-1648,
1655-1660, 1684, 1703-1706, 1753-1758, 1761-1765, 1775-1789, 1795-1796,
1800-1818, 1830-1831, 1852-1853, 1859-1860, 1863-1864, 1867-1873, 1876,
1884, 1887, 1890, 1906-1908, 1944-1948, 1952-1958, 1976-1977, 1987,
1991-2000, 2006-2010, 2027, 2036-2037, 2042-2045, 2048-2049, 2053, 2057,
2065-2071, 2098-2191, 2195-2215, 2219-2223, 2230-2235
/Users/chris/buildout-eggs/nose-1.1.2-py2.6.egg/nose/case
204 157 23% 5-27, 30, 35,
44, 47-56, 61-62, 66, 71-72, 76-98, 105-115, 134-138, 142, 150, 153-196,
199-217, 245-260, 264, 269, 273, 278-397
/Users/chris/buildout-eggs/nose-1.1.2-py2.6.egg/nose/core
156 134 14% 3-32, 35, 40,
46, 52, 57, 64-171, 181, 185, 196, 198-324
/Users/chris/buildout-eggs/nose-1.1.2-py2.6.egg/nose/importer
92 25 73% 7-21, 23, 26,
35, 41, 52, 83-84, 98, 105-112, 120-123, 132, 146-147, 151
/Users/chris/buildout-eggs/nose-1.1.2-py2.6.egg/nose/loader
342 189 45% 9-59, 80,
87-88, 98, 103, 108, 115-116, 119, 124, 155, 165, 178, 182-186, 194-288,
330, 334, 349, 362-373, 379, 394-398, 401, 409-417, 428-441, 449, 455,
461, 467-472, 483, 490, 493, 496-508, 515-518, 520, 524-529, 534, 537,
546-554, 559, 563-594
/Users/chris/buildout-eggs/nose-1.1.2-py2.6.egg/nose/plugins/cover
178 172 3% 13-63, 65-69,
71-161, 167-296, 301-307
/Users/chris/buildout-eggs/nose-1.1.2-py2.6.egg/nose/plugins/doctests
204 201 1% 50-90, 94-98,
102-428
/Users/chris/buildout-eggs/nose-1.1.2-py2.6.egg/nose/plugins/errorclass
65 59 9% 95-147, 149,
156-210
/Users/chris/buildout-eggs/nose-1.1.2-py2.6.egg/nose/plugins/logcapture
120 110 8% 18-82, 84-167,
171-177, 191-204, 209, 214-234
/Users/chris/buildout-eggs/nose-1.1.2-py2.6.egg/nose/plugins/manager
260 221 15% 47-82, 85-86,
93, 96, 104-105, 108, 120, 125-141, 145-158, 166, 174-178, 182-240,
248-334, 337-340, 343-345, 348-350, 354-446
/Users/chris/buildout-eggs/nose-1.1.2-py2.6.egg/nose/proxy
111 78 30% 18-29, 31-42,
44, 49, 61, 63, 67-77, 79, 85-101, 112, 116-118, 122-165, 170, 175-178,
184-190
/Users/chris/buildout-eggs/nose-1.1.2-py2.6.egg/nose/pyversion
78 68 13% 4-33, 41, 43,
48-55, 61-118, 123-130
/Users/chris/buildout-eggs/nose-1.1.2-py2.6.egg/nose/result
131 119 9% 11-36, 42,
46-100, 107, 112-198
/Users/chris/buildout-eggs/nose-1.1.2-py2.6.egg/nose/selector
134 56 58% 9-34, 36, 39,
47, 62, 70, 78-79, 83, 101-103, 107, 124-125, 132-133, 137, 142,
145-147, 150, 155, 159, 164-166, 172, 177, 181, 189, 195, 199-221, 223,
230-231, 243-250
/Users/chris/buildout-eggs/nose-1.1.2-py2.6.egg/nose/suite
394 207 47% 10-49, 54-66,
70, 73, 77, 85-87, 92, 101, 109-110, 115-145, 151, 159-171, 175,
178-196, 206, 209-214, 218-219, 228-267, 274-275, 293-295, 299, 304,
316-321, 331-332, 342-343, 352-354, 358, 370, 379-392, 394, 397, 408,
424-425, 428, 436, 441, 443, 449, 455, 467, 472, 487-537, 548, 556-561,
565, 569-604
/Users/chris/buildout-eggs/nose-1.1.2-py2.6.egg/nose/tools
99 87 12% 9-34, 42,
52-54, 59-194
/Users/chris/buildout-eggs/nose-1.1.2-py2.6.egg/nose/util
350 253 28% 3-139, 150,
159-163, 171, 174-180, 203, 207-242, 277, 291-306, 323-326, 335,
354-398, 403, 409-411, 421-449, 457-481, 487, 489, 496, 516, 528, 532,
538-595, 629, 651-663
/Users/chris/buildout-eggs/nose_fixes-1.1-py2.6.egg/nose_fixes/plugin
24 16 33% 1-6, 10, 18-39, 42
/Users/chris/buildout-eggs/nosexcover-1.0.7-py2.6.egg/nosexcover/nosexcover
25 24 4% 5-41, 46-56
/Users/chris/buildout-eggs/zope.component-3.12.0-py2.6.egg/zope/component/__init__
41 0 100%
/Users/chris/buildout-eggs/zope.component-3.12.0-py2.6.egg/zope/component/_api
137 89 35% 53-56, 61-64, 67-91,
94-97, 101-103, 107-110, 114-120, 123-128, 131-136, 139-142, 151-156,
166-169, 172, 175, 179, 191-200, 208-213, 219-220, 223, 226-236
/Users/chris/buildout-eggs/zope.component-3.12.0-py2.6.egg/zope/component/_declaration
29 13 55% 26, 33-46, 49, 55, 58-60
/Users/chris/buildout-eggs/zope.component-3.12.0-py2.6.egg/zope/component/globalregistry
40 10 75% 22, 36, 47, 56-57, 61, 68, 71,
74, 77
/Users/chris/buildout-eggs/zope.component-3.12.0-py2.6.egg/zope/component/hookable
14 1 93% 30
/Users/chris/buildout-eggs/zope.component-3.12.0-py2.6.egg/zope/component/interfaces
62 0 100%
/Users/chris/buildout-eggs/zope.component-3.12.0-py2.6.egg/zope/component/registry
24 4 83% 37, 41, 45, 49
/Users/chris/buildout-eggs/zope.event-3.5.1-py2.6.egg/zope/event/__init__
5 2 60% 30-31
/Users/chris/buildout-eggs/zope.interface-3.8.0-py2.6-macosx-10.4-x86_64.egg/zope/interface/__init__
19 0 100%
/Users/chris/buildout-eggs/zope.interface-3.8.0-py2.6-macosx-10.4-x86_64.egg/zope/interface/adapter
445 344 23% 98-128, 131-147, 150-197, 200-224,
227-284, 289-291, 298-300, 303-305, 308-318, 321-337, 340-348, 351,
354-365, 368-379, 383-394, 401-403, 406-408, 411-412, 415-416, 419-420,
427-428, 443-445, 474, 477-480, 489-491, 496-501, 504-523, 526-534,
537-551, 554, 557-576, 579-590, 607, 610-611, 616-617, 619-620, 628,
639-642, 645-648, 651-666, 669-678, 681-692
/Users/chris/buildout-eggs/zope.interface-3.8.0-py2.6-macosx-10.4-x86_64.egg/zope/interface/advice
77 32 58% 32-33, 59, 61, 64-69, 110, 125-134, 151,
162, 168-180, 186-200
/Users/chris/buildout-eggs/zope.interface-3.8.0-py2.6-macosx-10.4-x86_64.egg/zope/interface/declarations
313 145 54% 77, 101, 126, 164, 208-219, 241, 244, 286-314,
317, 322, 327-330, 334-337, 361, 476, 479-488, 493, 496-505, 516, 519,
660, 683-689, 763-764, 846-867, 935, 972-974, 979-989, 996-997, 1033,
1043-1054, 1115-1128, 1131-1134, 1140, 1143-1144, 1174, 1178, 1254,
1258-1269, 1277-1319, 1351-1358, 1388-1389
/Users/chris/buildout-eggs/zope.interface-3.8.0-py2.6-macosx-10.4-x86_64.egg/zope/interface/exceptions
21 8 62% 24, 27, 36-37, 40, 50-51, 54
/Users/chris/buildout-eggs/zope.interface-3.8.0-py2.6-macosx-10.4-x86_64.egg/zope/interface/interface
385 171 56% 34-38, 43-46, 69, 73, 77, 81, 85, 89,
119-120, 125-126, 159, 166-167, 177-190, 195-201, 207-208, 214-215,
275-278, 353-358, 401, 407, 412-427, 453-454, 472-473, 477, 486,
493-496, 517, 520, 524, 529, 543-552, 556-560, 565, 568, 571, 575-585,
589-604, 608, 611-616, 619-628, 631-647, 650, 675, 677, 688-689,
697-698, 701-702, 705-706, 709-710, 713-714, 744, 747, 755-765, 780-781,
808, 814-815
/Users/chris/buildout-eggs/zope.interface-3.8.0-py2.6-macosx-10.4-x86_64.egg/zope/interface/interfaces
137 2 99% 771, 923
/Users/chris/buildout-eggs/zope.interface-3.8.0-py2.6-macosx-10.4-x86_64.egg/zope/interface/registry
307 197 36% 21-22, 44-47, 80, 97-125, 132-169, 174,
177, 180-183, 186-187, 190, 194-202, 211-233, 238, 242, 245-248, 252,
256-259, 262-267, 273-284, 290-291, 296-333, 336, 342-351, 357, 360-391,
394, 398-401, 406-409, 414-438, 446, 451, 460, 463, 466, 469, 472, 475,
478, 485, 490, 499, 502, 505, 508, 511, 514, 517, 528, 533, 538
/Users/chris/buildout-eggs/zope.interface-3.8.0-py2.6-macosx-10.4-x86_64.egg/zope/interface/ro
25 0 100%
/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/configparser-write
NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/configparser-write.txt:1':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/configparser-write.txt:1'
/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/directory-contents
NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/directory-contents.txt:4':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/directory-contents.txt:4'
/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/directory-contents
NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/directory-contents.txt:29':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/directory-contents.txt:29'
/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/tmp2jM0ny/configparser-write
NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/configparser-write.txt:33':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/configparser-write.txt:33'
/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/tmp2jM0ny/configparser-write
NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/configparser-write.txt:10':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/configparser-write.txt:10'
/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/tmpMKZ9Wh/configparser-read
NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/configparser-read.txt:22':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/configparser-read.txt:22'
/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/tmpMKZ9Wh/configparser-read
NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/configparser-read.txt:35':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/configparser-read.txt:35'
comparing NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/comparing.txt:290':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/comparing.txt:290'
comparing NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/comparing.txt:236':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/comparing.txt:236'
comparing NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/comparing.txt:533':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/comparing.txt:533'
comparing NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/comparing.txt:352':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/comparing.txt:352'
comparing NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/comparing.txt:258':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/comparing.txt:258'
comparing NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/comparing.txt:401':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/comparing.txt:401'
comparing NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/comparing.txt:331':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/comparing.txt:331'
comparing NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/comparing.txt:504':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/comparing.txt:504'
comparing NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/comparing.txt:262':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/comparing.txt:262'
comparing NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/comparing.txt:310':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/comparing.txt:310'
comparing NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/comparing.txt:586':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/comparing.txt:586'
comparing NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/comparing.txt:212':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/comparing.txt:212'
comparing NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/comparing.txt:203':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/comparing.txt:203'
components NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/components.txt:4':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/components.txt:4'
configparser-read NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/configparser-read.txt:13':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/configparser-read.txt:13'
datetime NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/datetime.txt:482':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/datetime.txt:482'
datetime NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/datetime.txt:236':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/datetime.txt:236'
exceptions NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/exceptions.txt:79':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/exceptions.txt:79'
exceptions NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/exceptions.txt:20':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/exceptions.txt:20'
files NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/files.txt:20':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/files.txt:20'
files NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/files.txt:393': [Errno
2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/files.txt:393'
files NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/files.txt:246': [Errno
2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/files.txt:246'
files NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/files.txt:461': [Errno
2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/files.txt:461'
files NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/files.txt:58':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/files.txt:58'
files NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/files.txt:414': [Errno
2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/files.txt:414'
logging NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/logging.txt:287':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/logging.txt:287'
logging NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/logging.txt:226':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/logging.txt:226'
logging NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/logging.txt:66':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/logging.txt:66'
logging NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/logging.txt:139':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/logging.txt:139'
logging NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/logging.txt:257':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/logging.txt:257'
logging NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/logging.txt:318':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/logging.txt:318'
mocking NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/mocking.txt:87':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/mocking.txt:87'
mocking NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/mocking.txt:140':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/mocking.txt:140'
mocking NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/mocking.txt:315':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/mocking.txt:315'
mocking NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/mocking.txt:156':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/mocking.txt:156'
mocking NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/mocking.txt:251':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/mocking.txt:251'
mocking NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/mocking.txt:69':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/mocking.txt:69'
mocking NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/mocking.txt:37':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/mocking.txt:37'
mocking NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/mocking.txt:292':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/mocking.txt:292'
mocking NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/mocking.txt:197':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/mocking.txt:197'
mocking NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/mocking.txt:48':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/mocking.txt:48'
streams NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/streams.txt:17':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/streams.txt:17'
testfixtures/__init__
17 0 100%
testfixtures/comparison
246 5 98% 234, 243, 293,
386, 428
testfixtures/components
20 0 100%
testfixtures/logcapture
69 0 100%
testfixtures/manuel
56 0 100%
testfixtures/outputcapture
24 0 100%
testfixtures/replace
56 2 96% 29, 38
testfixtures/resolve
33 2 94% 37-38
testfixtures/shouldraise
52 0 100%
testfixtures/tdatetime
119 0 100%
testfixtures/tempdirectory
118 0 100%
testfixtures/tests/__init__
2 0 100%
testfixtures/tests/compat
49 4 92% 53, 60, 66, 79
testfixtures/tests/sample1
30 0 100%
testfixtures/tests/sample2
11 1 91% 13
testfixtures/tests/test_compare
172 3 98% 20, 28-30
testfixtures/tests/test_comparison
243 15 94% 38-40, 43,
125, 209, 231, 252, 272, 292, 312, 391, 408, 553, 579
testfixtures/tests/test_components
15 0 100%
testfixtures/tests/test_date
166 0 100%
testfixtures/tests/test_datetime
246 2 99% 21, 32
testfixtures/tests/test_diff
17 0 100%
testfixtures/tests/test_docs
11 0 100%
testfixtures/tests/test_generator
15 0 100%
testfixtures/tests/test_log_capture
59 0 100%
testfixtures/tests/test_logcapture
46 0 100%
testfixtures/tests/test_manuel
93 0 100%
testfixtures/tests/test_manuel_examples
19 0 100%
testfixtures/tests/test_outputcapture
52 0 100%
testfixtures/tests/test_replace
193 3 98% 177, 228, 262
testfixtures/tests/test_replacer
17 0 100%
testfixtures/tests/test_should_raise
183 11 94% 28, 41, 62,
189, 205, 217, 225-226, 238, 246, 263
testfixtures/tests/test_stringcomparison
25 0 100%
testfixtures/tests/test_tempdir
60 1 98% 87
testfixtures/tests/test_tempdirectory
123 0 100%
testfixtures/tests/test_time
113 2 98% 149, 175
testfixtures/tests/test_wrap
115 4 97% 233-236
testfixtures/utils
35 0 100%
utilities NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/utilities.txt:54':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/utilities.txt:54'
utilities NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/utilities.txt:120':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/utilities.txt:120'
utilities NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/utilities.txt:44':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/utilities.txt:44'
utilities NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/utilities.txt:71':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/utilities.txt:71'
utilities NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/utilities.txt:143':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/utilities.txt:143'
utilities NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/utilities.txt:88':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/utilities.txt:88'
----------------------------------------------------------------------------------------------------------------------------------------
TOTAL
9629 4070 58%
Traceback (most recent call last):
File "bin/nosetests", line 22, in <module>
nose.run_exit()
File "/Users/chris/buildout-eggs/nose-1.1.2-py2.6.egg/nose/core.py",
line 118, in __init__
**extra_args)
File "/usr/local/lib/python2.6/unittest.py", line 817, in __init__
self.runTests()
File "/Users/chris/buildout-eggs/nose-1.1.2-py2.6.egg/nose/core.py",
line 197, in runTests
result = self.testRunner.run(self.test)
File "/Users/chris/buildout-eggs/nose-1.1.2-py2.6.egg/nose/core.py",
line 63, in run
result.printErrors()
File
"/Users/chris/buildout-eggs/nose-1.1.2-py2.6.egg/nose/result.py", line
110, in printErrors
self.config.plugins.report(self.stream)
File
"/Users/chris/buildout-eggs/nose-1.1.2-py2.6.egg/nose/plugins/manager.py",
line 94, in __call__
return self.call(*arg, **kw)
File
"/Users/chris/buildout-eggs/nose-1.1.2-py2.6.egg/nose/plugins/manager.py",
line 162, in simple
result = meth(*arg, **kw)
File
"/Users/chris/buildout-eggs/nosexcover-1.0.7-py2.6.egg/nosexcover/nosexcover.py",
line 56, in report
self.coverInstance.xml_report(morfs, outfile=self.xcoverageFile)
File
"/Users/chris/buildout-eggs/coverage-3.5.1-py2.6-macosx-10.4-x86_64.egg/coverage/control.py",
line 626, in xml_report
reporter.report(morfs, outfile=outfile, config=self.config)
File
"/Users/chris/buildout-eggs/coverage-3.5.1-py2.6-macosx-10.4-x86_64.egg/coverage/xmlreport.py",
line 57, in report
self.report_files(self.xml_file, morfs, config)
File
"/Users/chris/buildout-eggs/coverage-3.5.1-py2.6-macosx-10.4-x86_64.egg/coverage/report.py",
line 86, in report_files
report_fn(cu, self.coverage._analyze(cu))
File
"/Users/chris/buildout-eggs/coverage-3.5.1-py2.6-macosx-10.4-x86_64.egg/coverage/control.py",
line 545, in _analyze
return Analysis(self, it)
File
"/Users/chris/buildout-eggs/coverage-3.5.1-py2.6-macosx-10.4-x86_64.egg/coverage/results.py",
line 28, in __init__
exclude=self.coverage._exclude_regex('exclude')
File
"/Users/chris/buildout-eggs/coverage-3.5.1-py2.6-macosx-10.4-x86_64.egg/coverage/parser.py",
line 35, in __init__
"No source for code: %r: %s" % (self.filename, err)
coverage.misc.NoSource: No source for code:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/configparser-write.txt:1':
[Errno 2] No such file or directory:
'/private/var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/configparser-write.txt:1'

--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk

Ned Batchelder

unread,
Jan 16, 2012, 4:50:58 PM1/16/12
to Chris Withers, testing-...@lists.idyll.org, nose-...@googlegroups.com
On 1/16/2012 2:11 PM, Chris Withers wrote:
>
> Having some truly weird behaviour with coverage and the tests for my
> testfixtures package.
>
> When I run the tests as follows:
>
> $ bin/nosetests --with-xcoverage --xcoverage-file=$PWD/coverage.xml
>
> ...I get plenty of coverage output, but none of it is for the
> testfixtures package itself, even though all its tests run successfully.
>
> If I run as follows:
>
> $ bin/nosetests --with-xcoverage --xcoverage-file=$PWD/coverage.xml
> --cover-package=testfixtures
>
> ...I get the output in the PS of this mail.
>
> Problems appear to be:
>
> - coverage info is still being reported for the manuel, nose,
> nose_fixes, nosexcover, zope.component, zope.event and zope.interface
> packages. Why is that?
>
> - coverage info is being collected for the tests folder of the
> testfixtures package, which just contains the unit tests. How do I
> tell coverage-via-nose not to include anything in testfixtures.tests?
>
> - because of the above, there's lots of problems with python examples
> in doctests run by manuel not having any source. One of these appears
> to blow up the report generation, which seems unintentional?
>
> Any help gratefully appreciated!
Chris, to tell you the truth, I don't know how the nose coverage plugin
works, and therefore I recommend people not use it. I use coverage to
run the test runner, instead of the other way around. Even if you do
use nose to drive coverage, you're better off using the .coveragerc file
to control the reporting. The source option is great for controlling
coverage's attention.

--Ned.

meme dough

unread,
Jan 19, 2012, 3:22:12 AM1/19/12
to nose-...@googlegroups.com
Hi,

You could use nose-cov which uses the latest coverage features like
source roots, any number of xml / html / annotated / term /
term-missing reports, full control with coverage's own .coveragerc
config file and even measures coverage of sub processes out of the
box.

pip install nose-cov

nosetests --with-cov --cov myproj tests/

And I understand how it works ;)

> --
> You received this message because you are subscribed to the Google Groups
> "nose-users" group.
> To post to this group, send email to nose-...@googlegroups.com.
> To unsubscribe from this group, send email to
> nose-users+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/nose-users?hl=en.
>

Chris Withers

unread,
Jan 24, 2012, 3:49:39 AM1/24/12
to nose-...@googlegroups.com, meme dough
On 19/01/2012 08:22, meme dough wrote:
> Hi,
>
> You could use nose-cov which uses the latest coverage features like
> source roots, any number of xml / html / annotated / term /
> term-missing reports, full control with coverage's own .coveragerc
> config file and even measures coverage of sub processes out of the
> box.
>
> pip install nose-cov
>
> nosetests --with-cov --cov myproj tests/

Hmm :-(

$ bin/nosetests --with-cov
.....................................................................................................................................................................................................................................................................................................................................................................


Traceback (most recent call last):

File "bin/nosetests", line 23, in <module>
nose.run_exit()
File
"/Users/chris/buildout-eggs/nose-1.1.3.dev-py2.6.egg/nose/core.py", line

118, in __init__
**extra_args)
File "/usr/local/lib/python2.6/unittest.py", line 817, in __init__
self.runTests()
File

"/Users/chris/buildout-eggs/nose-1.1.3.dev-py2.6.egg/nose/core.py", line

197, in runTests
result = self.testRunner.run(self.test)
File

"/Users/chris/buildout-eggs/nose-1.1.3.dev-py2.6.egg/nose/core.py", line

63, in run
result.printErrors()
File

"/Users/chris/buildout-eggs/nose-1.1.3.dev-py2.6.egg/nose/result.py",

line 110, in printErrors
self.config.plugins.report(self.stream)
File

"/Users/chris/buildout-eggs/nose-1.1.3.dev-py2.6.egg/nose/plugins/manager.py",

line 94, in __call__
return self.call(*arg, **kw)
File

"/Users/chris/buildout-eggs/nose-1.1.3.dev-py2.6.egg/nose/plugins/manager.py",

line 162, in simple
result = meth(*arg, **kw)

File "/Users/chris/buildout-eggs/nose_cov-1.4-py2.6.egg/nose_cov.py",
line 68, in report
log.debug('nose-cov report')
File "/usr/local/lib/python2.6/logging/__init__.py", line 1044, in debug
self._log(DEBUG, msg, args, **kwargs)
File "/usr/local/lib/python2.6/logging/__init__.py", line 1173, in _log
self.handle(record)
File "/usr/local/lib/python2.6/logging/__init__.py", line 1183, in handle
self.callHandlers(record)
File "/usr/local/lib/python2.6/logging/__init__.py", line 1219, in
callHandlers
if record.levelno >= hdlr.level:
AttributeError: 'object' object has no attribute 'level'


Any ideas?

Chris

meme dough

unread,
Jan 24, 2012, 6:13:44 AM1/24/12
to Chris Withers, nose-...@googlegroups.com
Hi,

It doesn't look like a coverage, nose or nose-cov issue, what happened
to the logger? It logs at the start of coverage measurement in begin
hook and logs at end of coverage measurement in report hook.

The log at beginning presumably worked, so what happened by the end of
test that caused statement "log.debug('nose-cov report')" to fail?

You could modify the nose_cov.py file to comment out the log lines
(which just log the entry to hook fns) just to see if you get any
further - but this seems pretty broken that using the logger to log a
simple string works at the beginning of the test run but fails at the
end of the test run.

I don't see any reason for the logging module to fail like that, but I
could just rip out the logging completely since it only logs entry to
hook fns.

Do you want to try or should I remove all logging from plugin?

Chris Withers

unread,
Jan 24, 2012, 1:06:33 PM1/24/12
to nose-...@googlegroups.com, meme dough
On 24/01/2012 11:13, meme dough wrote:
> It doesn't look like a coverage, nose or nose-cov issue, what happened
> to the logger? It logs at the start of coverage measurement in begin
> hook and logs at end of coverage measurement in report hook.

My bad :-S

https://github.com/Simplistix/testfixtures/commit/382cedf0ca1d09e08b963419b09bbbdacdc72378

> Do you want to try or should I remove all logging from plugin?

Fixed, and the plugin has been a really good experience so far, so I'll
be using it for my coverage reporting from now on!

cheers,

Andrea Crotti

unread,
Jan 26, 2012, 10:36:48 AM1/26/12
to nose-...@googlegroups.com, Ned Batchelder, Chris Withers, testing-...@lists.idyll.org
On 01/16/2012 09:50 PM, Ned Batchelder wrote:
> Chris, to tell you the truth, I don't know how the nose coverage
> plugin works, and therefore I recommend people not use it. I use
> coverage to run the test runner, instead of the other way around.
> Even if you do use nose to drive coverage, you're better off using the
> .coveragerc file to control the reporting. The source option is great
> for controlling coverage's attention.
>
> --Ned.
>


Interesting, is there any resource where it's explained a possible way
to do this "other way around"?
I would like to try out, and it might be better than the nose plugin..

Chris Withers

unread,
Jan 26, 2012, 10:44:39 AM1/26/12
to Andrea Crotti, nose-...@googlegroups.com, Ned Batchelder, testing-...@lists.idyll.org
On 26/01/2012 15:36, Andrea Crotti wrote:
> Interesting, is there any resource where it's explained a possible way
> to do this "other way around"?
> I would like to try out, and it might be better than the nose plugin..

nose-cov, the new plugin, has been perfect.

cheers,

Chris

Reply all
Reply to author
Forward
0 new messages