#23033 closed defect (fixed)

BridgeDB's tests are failing due to Twisted Trial changing the way modules are called

Reported by: isis Owned by: isis
Priority: High Milestone:
Component: Obfuscation/BridgeDB Version:
Severity: Normal Keywords: bridgedb-test, bridgedb-ci
Cc: Actual Points:
Parent ID: #23032 Points: .5
Reviewer: Sponsor: SponsorM

Description

This is happening after the upgrade to Debian 9, because Twisted was upgraded from 14.0.2 to 16.6.0. Relative imports of helper functions in the unittests directory are now broken:

[ERROR]

Traceback (most recent call last):
  File "/home/travis/virtualenv/python2.7.13/lib/python2.7/site-packages/twisted/trial/runner.py", line 602, in loadByNames
    things.append(self.findByName(name))
  File "/home/travis/virtualenv/python2.7.13/lib/python2.7/site-packages/twisted/trial/runner.py", line 405, in findByName
    return filenameToModule(name)
  File "/home/travis/virtualenv/python2.7.13/lib/python2.7/site-packages/twisted/trial/runner.py", line 96, in filenameToModule
    return _importFromFile(fn)
  File "/home/travis/virtualenv/python2.7.13/lib/python2.7/site-packages/twisted/trial/runner.py", line 119, in _importFromFile
    module = imp.load_source(moduleName, fn, fd)
  File "./test/test_translations.py", line 14, in <module>
    from .https_helpers import DummyRequest
exceptions.ValueError: Attempted relative import in non-package

Child Tickets

Change History (1)

comment:1 Changed 15 months ago by isis

Points: .5
Resolution: fixed
Status: newclosed

Fixed in my fix/23033 branch (and tests pass). This is now merged into develop for 0.5.x.

Note: See TracTickets for help on using tickets.