Edgewall Software
Modify

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#304 closed defect (invalid)

`unittest' extension includes HTML files in code coverage analysis

Reported by: gustavo@… Owned by: cmlenz
Priority: critical Milestone:
Component: General Version: dev
Keywords: html, code coverage Cc:
Operating System: Linux

Description

The `unittest' extension for setuptools includes *.html files in the code coverage analysis and therefore I get the following error:

Traceback (most recent call last):
  File "./setup.py", line 69, in <module>
    'start-animador = animador.commands:start',
  File "/usr/lib/python2.5/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.5/distutils/dist.py", line 974, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.5/distutils/dist.py", line 994, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/test.py", line 121, in run
  File "/usr/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/command/test.py", line 101, in with_project_on_sys_path
  File "/usr/lib/python2.5/site-packages/Bitten-0.6dev_r555-py2.5.egg/bitten/util/testrunner.py", line 146, in run_tests
    self._run_with_trace()
  File "/usr/lib/python2.5/site-packages/Bitten-0.6dev_r555-py2.5.egg/bitten/util/testrunner.py", line 200, in _run_with_trace
    coverdir=self.coverage_dir)
  File "/usr/lib/python2.5/trace.py", line 307, in write_results
    lnotab = find_executable_linenos(filename)
  File "/usr/lib/python2.5/trace.py", line 431, in find_executable_linenos
    code = compile(prog, filename, "exec")
  File "/home/gustavo/animador/animador/templates/login.html", line 1
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    ^
SyntaxError: invalid syntax

If I run unittest without setting command-line options for code coverage analysis, everything works like a charm.

Just in case, my repository is https://svn.gnulinuxmatters.org:81/animador/trunk/ and if you need to browse the code you can go to https://tracker.gnulinuxmatters.org/browser/animador/trunk

Attachments (3)

unittest-bittenslave (14.2 KB) - added by gustavo@… 16 years ago.
Output of bitten-slave for the latest build, which fails because a HTML file is included in the code coverage
unittest-setuppy (6.1 KB) - added by gustavo@… 16 years ago.
Output of `setup.py unittest' when using options for code coverage analysis
bitten_recipe (874 bytes) - added by gustavo@… 16 years ago.
My Bitten recipe

Download all attachments as: .zip

Change History (6)

Changed 16 years ago by gustavo@…

Output of bitten-slave for the latest build, which fails because a HTML file is included in the code coverage

Changed 16 years ago by gustavo@…

Output of `setup.py unittest' when using options for code coverage analysis

Changed 16 years ago by gustavo@…

My Bitten recipe

comment:1 Changed 16 years ago by gustavo@…

I'm sorry. I've just found that the problem is that I'm not using setuptols' package_data correctly, but I cannot close this ticket. Can someone please close it?

comment:2 Changed 16 years ago by cmlenz

  • Milestone 0.6 deleted
  • Resolution set to invalid
  • Status changed from new to closed

Closing as requested

comment:3 Changed 16 years ago by gustavo@…

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain cmlenz.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.