summaryrefslogtreecommitdiff
path: root/test/base/test_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/base/test_utils.py')
-rw-r--r--test/base/test_utils.py35
1 files changed, 0 insertions, 35 deletions
diff --git a/test/base/test_utils.py b/test/base/test_utils.py
index 2a912f349..a88b7c56c 100644
--- a/test/base/test_utils.py
+++ b/test/base/test_utils.py
@@ -1976,41 +1976,6 @@ class DuckTypeCollectionTest(fixtures.TestBase):
is_(util.duck_type_collection(instance), None)
-class PublicFactoryTest(fixtures.TestBase):
- def _fixture(self):
- class Thingy:
- def __init__(self, value):
- "make a thingy"
- self.value = value
-
- @classmethod
- def foobar(cls, x, y):
- "do the foobar"
- return Thingy(x + y)
-
- return Thingy
-
- def test_classmethod(self):
- Thingy = self._fixture()
- foob = langhelpers.public_factory(Thingy.foobar, ".sql.elements.foob")
- eq_(foob(3, 4).value, 7)
- eq_(foob(x=3, y=4).value, 7)
- eq_(foob.__doc__, "do the foobar")
- eq_(foob.__module__, "sqlalchemy.sql.elements")
- assert Thingy.foobar.__doc__.startswith("This function is mirrored;")
-
- def test_constructor(self):
- Thingy = self._fixture()
- foob = langhelpers.public_factory(Thingy, ".sql.elements.foob")
- eq_(foob(7).value, 7)
- eq_(foob(value=7).value, 7)
- eq_(foob.__doc__, "make a thingy")
- eq_(foob.__module__, "sqlalchemy.sql.elements")
- assert Thingy.__init__.__doc__.startswith(
- "Construct a new :class:`.Thingy` object."
- )
-
-
class ArgInspectionTest(fixtures.TestBase):
def test_get_cls_kwargs(self):
class A: