spack/var/spack/repos/builtin/packages/openbabel/testpdbformat-tabs-to-spaces.patch
Adam J. Stewart 48588cb1d8 Add a new package for Open Babel (#4256)
* Add a new package for Open Babel

* Add post-installation tests, stolen from the fine folks at Homebrew

* Add patch to fix Python 3.6 support

* Add a more complete patch to get Python 3.6 support working

* Add patch to convert tabs to spaces in test script

testpdbformat.py contains mixed tabs and spaces
causing the unit tests to fail. With this patch,
all tests pass with flying colors.
2017-05-18 10:06:44 -05:00

48 lines
2.0 KiB
Diff

From 08cd38485d4cf1df8802da540f3018921dbc735e Mon Sep 17 00:00:00 2001
From: "Adam J. Stewart" <ajstewart426@gmail.com>
Date: Wed, 17 May 2017 10:56:23 -0500
Subject: [PATCH] Convert tabs to spaces in testpdbformat.py
See https://github.com/openbabel/openbabel/pull/1568
---
test/testpdbformat.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/test/testpdbformat.py b/test/testpdbformat.py
index 40bd316..ceb8496 100644
--- a/test/testpdbformat.py
+++ b/test/testpdbformat.py
@@ -24,12 +24,12 @@ class TestPDBFormat(BaseTest):
def testInsertionCodes(self):
"""
- Testing a PDB entry with insertion codes to distinguish residues
- upon conversion to FASTA.
+ Testing a PDB entry with insertion codes to distinguish residues
+ upon conversion to FASTA.
"""
self.canFindExecutable("babel")
- self.entryPDBwithInsertioncodes="""ATOM 406 N VAL L 29 58.041 17.797 48.254 1.00 0.00 N
+ self.entryPDBwithInsertioncodes="""ATOM 406 N VAL L 29 58.041 17.797 48.254 1.00 0.00 N
ATOM 407 CA VAL L 29 57.124 18.088 47.170 1.00 0.00 C
ATOM 408 C VAL L 29 55.739 17.571 47.538 1.00 0.00 C
ATOM 409 O VAL L 29 55.535 16.362 47.550 1.00 0.00 O
@@ -100,9 +100,9 @@ ATOM 473 HE1 TYR L 32 48.512 15.775 42.066 1.00 0.00 H
ATOM 474 HE2 TYR L 32 48.145 19.172 44.648 1.00 0.00 H
ATOM 475 HH TYR L 32 46.462 17.658 44.280 1.00 0.00 H
"""
- output, error = run_exec(self.entryPDBwithInsertioncodes,
- "babel -ipdb -ofasta")
- self.assertEqual(output.rstrip().rsplit("\n",1)[1], "VSSSY")
+ output, error = run_exec(self.entryPDBwithInsertioncodes,
+ "babel -ipdb -ofasta")
+ self.assertEqual(output.rstrip().rsplit("\n",1)[1], "VSSSY")
if __name__ == "__main__":
testsuite = []
--
2.9.4