summaryrefslogtreecommitdiff
path: root/tests/testutil.py
diff options
context:
space:
mode:
authorCurtis Vogt <curtis.vogt@invenia.ca>2014-03-07 11:00:47 -0600
committerAlex Grönholm <alex.gronholm@nextday.fi>2014-03-08 08:43:39 +0200
commita6a56328ac88049f42012c3d492f9d8c2b9c347e (patch)
tree9788a7b0acca250976ef4068dec5d291bb65ef19 /tests/testutil.py
parent05141a0282516109e7092707ab73bdfda11465e0 (diff)
downloadapscheduler-a6a56328ac88049f42012c3d492f9d8c2b9c347e.tar.gz
Fixed issue in obj_to_ref when __module__ attribute doesn't exist.2.1
Diffstat (limited to 'tests/testutil.py')
-rw-r--r--tests/testutil.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/testutil.py b/tests/testutil.py
index b9749fb..399560a 100644
--- a/tests/testutil.py
+++ b/tests/testutil.py
@@ -1,5 +1,6 @@
# coding: utf-8
from datetime import date, datetime, timedelta
+from functools import partial
import time
import os
import sys
@@ -185,6 +186,7 @@ def test_callable_name():
def test_obj_to_ref():
assert_raises(ValueError, obj_to_ref, DummyClass.meth)
assert_raises(ValueError, obj_to_ref, DummyClass.staticmeth)
+ assert_raises(ValueError, obj_to_ref, partial(DummyClass.meth))
eq_(obj_to_ref(DummyClass.classmeth), 'testutil:DummyClass.classmeth')
eq_(obj_to_ref(shelve.open), 'shelve:open')