Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #7499

Closed
Open
Created Nov 17, 2012 by Trac@tracbot

Unit test bug - mocking.py:_get_descriptor_content() handlign of 'opt' keyword

mocking.py:_get_descriptor_content() contains several bugs with how the opt keyword is handled.

The attr arg is converted to a dictionary, so if more than one attribute is supplied using the opt keyword it is overwritten by the last element.

Any args supplied using the keyword opt will not be matched to the corresponding keyword in header_template. This will cause the template be invalid.

Any args supplied in attr to ovewrite values that use opt in the header_template will not be matched. This will cause the tempalte to be invalid.

The easiest fix for all of the above would be to not allow use of the opt keyword with this function in the unit tests.

Trac:
Username: eoinof

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking