Skip to content

Commit b82d096

Browse files
add test for issue #463
1 parent dc085c1 commit b82d096

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tests/test_relational_operand.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ def test_join():
115115

116116
# test pairing
117117
# Approach 1: join then restrict
118-
x = A().proj(a1='id_a', c1='cond_in_a')
119-
y = A().proj(a2='id_a', c2='cond_in_a')
118+
x = A.proj(a1='id_a', c1='cond_in_a')
119+
y = A.proj(a2='id_a', c2='cond_in_a')
120120
rel = x * y & 'c1=0' & 'c2=1'
121121
lenx = len(x & 'c1=0')
122122
leny = len(y & 'c2=1')
@@ -125,10 +125,14 @@ def test_join():
125125
assert_equal(len(rel), len(x & 'c1=0') * len(y & 'c2=1'),
126126
'incorrect pairing')
127127
# Approach 2: restrict then join
128-
x = (A() & 'cond_in_a=0').proj(a1='id_a')
129-
y = (A() & 'cond_in_a=1').proj(a2='id_a')
128+
x = (A & 'cond_in_a=0').proj(a1='id_a')
129+
y = (A & 'cond_in_a=1').proj(a2='id_a')
130130
assert_equal(len(rel), len(x * y))
131131

132+
def test_issue_463(self):
133+
x = (A & B) * B
134+
x.fetch()
135+
132136
@staticmethod
133137
def test_project():
134138
x = A().proj(a='id_a') # rename

0 commit comments

Comments
 (0)