Commit db991b38 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Merge pull request #895 from kmod/sqlalchemy

Last few fixes to make sqlalchemy_declarative work
parents 74fce7a4 4dad82a0
......@@ -2,7 +2,7 @@
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "../test/testsuite/lib/sqlalchemy/lib"))
sys.path.append(os.path.join(os.path.dirname(__file__), "../test/lib/sqlalchemy/lib"))
from sqlalchemy import Column, ForeignKey, Integer, String
from sqlalchemy.ext.declarative import declarative_base
......
......@@ -659,8 +659,11 @@ void setupSet() {
set_cls->giveAttr("difference_update",
new BoxedFunction(boxRTFunction((void*)setDifferenceUpdate, UNKNOWN, 1, 0, true, false)));
set_cls->giveAttr("issubset", new BoxedFunction(boxRTFunction((void*)setIssubset, UNKNOWN, 2)));
frozenset_cls->giveAttr("issubset", set_cls->getattr(internStringMortal("issubset")));
set_cls->giveAttr("issuperset", new BoxedFunction(boxRTFunction((void*)setIssuperset, UNKNOWN, 2)));
frozenset_cls->giveAttr("issuperset", set_cls->getattr(internStringMortal("issuperset")));
set_cls->giveAttr("isdisjoint", new BoxedFunction(boxRTFunction((void*)setIsdisjoint, UNKNOWN, 2)));
frozenset_cls->giveAttr("isdisjoint", set_cls->getattr(internStringMortal("isdisjoint")));
set_cls->giveAttr("copy", new BoxedFunction(boxRTFunction((void*)setCopy, UNKNOWN, 1)));
set_cls->giveAttr("pop", new BoxedFunction(boxRTFunction((void*)setPop, UNKNOWN, 1)));
......
......@@ -128,7 +128,7 @@ for i in xrange(10):
for s1 in set(range(5)), frozenset(range(5)):
for s2 in compare_to:
print type(s2), sorted(s2), s.issubset(s2), s.issuperset(s2), s == s2, s != s2, sorted(s.difference(s2)), s.isdisjoint(s2), sorted(s1.union(s2)), sorted(s1.intersection(s2))
print type(s2), sorted(s2), s1.issubset(s2), s1.issuperset(s2), s1 == s2, s1 != s2, sorted(s1.difference(s2)), s1.isdisjoint(s2), sorted(s1.union(s2)), sorted(s1.intersection(s2))
f = float('nan')
s = set([f])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment