Commits

dalke  committed c9e9573

added tests for the query fingerprints.

  • Participants
  • Parent commits 7a9697a

Comments (0)

Files changed (1)

File test_cyclops_mysql.py

 _check(sid6_substruct_fp, 14)  # >= 1 N
 _check(sid6_substruct_fp, 299) # N-H
 
+#### Query fingerprints
+
+sid1_substruct_qfp = (
+    # This is a raw carbon atom, [C]
+    "000000000000000000000000000000000000000000000000000000000000"
+    "000000000000000000000000000000000000000000000000000000000000"
+    "000000000000000000000000000000000000000000000000000000000000"
+    "000000000000000000000000000000000000000000")
+
+sid6_substruct_qfp = (
+    # This is a raw nitrogen [N]
+    "004000000000000000000000000000000000000000000000000000000000"
+    "000000000000000000000000000000000000000000000000000000000000"
+    "000000000000000000000000000000000000000000000000000000000000"
+    "000000000000000000000000000000000000000000")
+_check(sid6_substruct_qfp, 14)  # >= 1 N
+
 
 class TestCyclopsSubstruct(unittest.TestCase):
     def assertEqualFps(self, fp1, fp2):
 
     def test_against_special_queries(self):
         self.assertEquals(L("select cyclops_substruct_qfp('[B]')")[0],
-                          (B_substruct_qfp,))
+                          (B_substruct_fp,))
         self.assertEquals(L("select cyclops_substruct_qfp('[U]')")[0],
-                          (U_substruct_qfp,))
+                          (U_substruct_fp,))
         self.assertEquals(L("select cyclops_substruct_qfp('[U].[B]')")[0],
-                          (UB_substruct_qfp,))
+                          (UB_substruct_fp,))
         self.assertEquals(L("select cyclops_substruct_qfp('C')")[0],
                           (sid1_substruct_qfp,))
         self.assertEquals(L("select cyclops_substruct_qfp('[NH4+]')")[0],