示例#1
0
 def test_empty(self):
     for ex in ['', '1', '1+2', '1+3>2']:
         self.assertEquals(0, len(extract_var(ex)))
示例#2
0
 def test_basic(self):
     self.assertEquals(set(['x']), extract_var('x'))
     self.assertEquals(set(['x']), extract_var('x+x'))
     self.assertEquals(set(['x', 'y']), extract_var('x+y'))
     self.assertEquals(set(['x', 'y']), extract_var('x+1==y'))