Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #7795

Closed
Open
Opened Dec 25, 2012 by Arturo Filasto@art

Problems in cmd line argument parsing when importing test template modules

When importing test template modules inside of an ooniprobe nettest (that means doing from ooni.template.httpt import HTTPTest) command line argument parsing will not work as expected.

The problem lies in the fact that inside of runner.py if a certain test isTestCase (that is it's a subclass of NetTest) we will call processTest on it. processTest will do command line argument parsing and since that object does not have the proper usageOptions set it will fail to parse the command line arguments of the actual test.

The quick and easy workaround it to simply not import the test class directly, but just import the module (that means doing from ooni.template import httpt).

The long term solution probably involves finding a way to distinguish a test template from a subclass of it.

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#7795