Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1234 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

[PATCH] fix nosetests for 1.0 branch

Reported by: dundeemt Owned by: alberto
Priority: normal Milestone: 1.0.1
Component: Tests Version: 1.0b2
Severity: normal Keywords:
Cc: alberto@…

Description

The nosetests on the 1.0 branch were failing because html attributes were being returned as lower case and being tested against all UPPER case. Alberto asked for a patch to be submitted.

 http://groups-beta.google.com/group/turbogears-trunk/msg/9e182f80d805a1c4

This is that patch

Attachments

nosetests.patch Download (4.5 KB) - added by dundeemt 12 years ago.
patch to correct failing nosetests (case impedance)
testing_for_all_kid_versions.patch Download (42.8 KB) - added by chrisz 12 years ago.
Improved patch working with all Kid versions.

Change History

Changed 12 years ago by dundeemt

patch to correct failing nosetests (case impedance)

comment:1 Changed 12 years ago by dundeemt

  • Summary changed from [patch] fix nosetests for 1.0 branch to [PATCH] fix nosetests for 1.0 branch

comment:2 Changed 12 years ago by dundeemt

  • Cc alberto@… added
  • Milestone set to 1.0

added Alberto to the CC list

comment:3 Changed 12 years ago by alberto

  • Milestone changed from 1.0 to 1.0.1

This patch is only needed for Kid == 0.9.4. However, I've just upgraded to 0.9.4 and I'm seeing plenty of "TypeError?: generate_content() takes exactly 1 argument (2 given)" too.

I think the safest solution for this would be to make TurboKid? require Kid < 0.9.4 and don't apply this patch as will tests fail under Kid < 0.9.4

Opinions?

comment:4 Changed 12 years ago by chrisz

The TypeErrors? come from incompatibility of Kid 0.9.3 compiled templates with Kid 0.9.4 library. Though this will be solved in Kid 0.9.5 which recompiles automatically, the test should remove old .pyc files in template directories.

Also, it would be good to use 'xhtml' instead of 'html' output for the tests since this will avoid case ambiguities and stays compatible with Kid < 0.9.4.

I'll try submitting a new patch adding these two points.

Changed 12 years ago by chrisz

Improved patch working with all Kid versions.

comment:5 Changed 12 years ago by chrisz

The new patch always explicitely sets the format to xhtml, and uses lower() on the output only in some cases. It works with Kid 0.9.3, 0.9.4 and the current trunk (essentially Kid 0.9.5). The patch also cares about removing all compiled Kid templates before running the tests.

comment:6 Changed 12 years ago by alberto

  • Status changed from new to assigned
  • Owner changed from anonymous to alberto

comment:7 Changed 12 years ago by alberto

  • Status changed from assigned to closed
  • Resolution set to fixed

Comitted at [2364]. Thanks! :) Alberto

Note: See TracTickets for help on using tickets.