From 7de27f309db5f7ec026ef5c5235e5b33bf7d1a85 Mon Sep 17 00:00:00 2001 From: John Bollinger Date: Thu, 14 May 2020 08:46:40 -0500 Subject: [PATCH] Fix test failure with Python 3 When run with Python 3.6, test/testdistgeom.py fails with a SyntaxError about a malformed character escape. This arises from a failure to escape literal backslash characters in single-quoted SMILES strings (several occurrences). Python 2 accepts this and does the right things with it, but Python 3 rejects it. Fixes #2217 --- test/testdistgeom.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/testdistgeom.py b/test/testdistgeom.py index 0fa5adb576..fc3a7515b9 100644 --- a/test/testdistgeom.py +++ b/test/testdistgeom.py @@ -42,13 +42,13 @@ def testSMItoSMI(self): 'C1CC[C@H]2[C@@H](C1)CCCC2', # cis-decalin 'C1CC[C@@H]2[C@@H](C1)CCCC2', # trans-decalin '[C@H]1(NC[C@H]2[C@H]1N2)OC', - 'Clc1cccc(Cl)c1\C=N\NC(=O)c1cccs1', - 'O=C1NC(=S)S\C1=C/c1ccco1', + 'Clc1cccc(Cl)c1\\C=N\\NC(=O)c1cccs1', + 'O=C1NC(=S)S\\C1=C/c1ccco1', 'S=C1NC(=O)/C(=C/c2ccco2)/S1', - 'O=C1NC(=S)N\C1=C\c1ccncc1', + 'O=C1NC(=S)N\\C1=C\\c1ccncc1', 'S=C1NC(=O)C(=C)N1', - 'CC(=O)N\N=C\c1ccncc1', - 'N/N=c/1\sc2c(n1C)cccc2', + 'CC(=O)N\\N=C\\c1ccncc1', + 'N/N=c/1\\sc2c(n1C)cccc2', 'OCCN/C=C\\1/C(=NN(C1=O)c1ccccc1)C', 'Cc1ccc(o1)/C=C/C=O', # disabled to make test run faster: