Start fixing tests.

This commit is contained in:
Nathan Baker
2020-05-18 20:37:56 -07:00
parent e9a88bee4b
commit 17bad90dc4

View File

@@ -1,10 +1,12 @@
"""Reproduce tests from original PROPKA."""
import os import os
import re import re
from subprocess import call from subprocess import call
import sys import sys
import unittest import unittest
import logging import logging
import propka.lib
import propka.molecular_container
# This error tolerance was chosen to make Ubuntu 18.04 pass under Windows # This error tolerance was chosen to make Ubuntu 18.04 pass under Windows
@@ -12,6 +14,22 @@ import logging
ACCEPTABLE_ERROR = 0.001 ACCEPTABLE_ERROR = 0.001
def run_propka(args):
"""Run PROPKA.
Args:
args: command-line arguments for PROPKA
"""
options = propka.lib.loadOptions()
raise NotImplementedError("Need to incorporated command-line arguments")
pdbfiles = options.filenames
for pdbfile in pdbfiles:
my_molecule = propka.molecular_container.Molecular_container(pdbfile, options)
my_molecule.calculate_pka()
my_molecule.write_pka()
# Setting this up as a direct translation of the original runtest.py script # Setting this up as a direct translation of the original runtest.py script
# that will be run as part of 'python setup.py test'. This takes on the # that will be run as part of 'python setup.py test'. This takes on the
# order of 10s to run. # order of 10s to run.