Skip to content

Commit

Permalink
Build: Monkeypatch nose to support python3 (#2779)
Browse files Browse the repository at this point in the history
In python3:
  collections.Callable -> collections.abc.Callable

So we test for collections.Callable and then monkeypatch collections if it's not there
  • Loading branch information
WhoBrokeTheBuild authored May 31, 2024
1 parent a793598 commit e89d4b0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions testing/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@ def run_tap(self, module):
tr.run(tests)

def run_nose(self, module_name):
import collections

try:
collections.Callable
except:
import collections.abc
collections.Callable = collections.abc.Callable

import nose
import shutil
f = self.test_format
Expand Down

0 comments on commit e89d4b0

Please sign in to comment.