Skip to content

Commit

Permalink
rearrange tests (#11)
Browse files Browse the repository at this point in the history
* consolidate tests

* fix up paths

* fix
  • Loading branch information
loriab authored Apr 17, 2024
1 parent 48a28cb commit decc009
Show file tree
Hide file tree
Showing 61 changed files with 14 additions and 15 deletions.
6 changes: 2 additions & 4 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ addopts = --import-mode=importlib

# locations from which test helper fls can be imported
pythonpath =
tests/
qcmanybody/models
qcmanybody/tests

# test fl locations rel to this fl to use if paths not specified
testpaths =
tests/
qcmanybody/models
qcmanybody/tests

markers =
addon: "tests require external non-required software"
Expand Down
2 changes: 1 addition & 1 deletion qcmanybody/models/manybody_pydv1.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ class Config(ProtoModel.Config):
# if/else suppresses a warning about using dynamically generated class as Field type in ManyBodyResults
ManyBodyResultProperties = create_model(
"ManyBodyResultProperties",
__doc__=manybodyresultproperties_doc, # needs later pydantic
#__doc__=manybodyresultproperties_doc, # needs later pydantic
__base__=ProtoModelSkipDefaults,
**mbprop,
)
Expand Down
File renamed without changes.
Empty file added qcmanybody/tests/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
from qcmanybody.models.qcng_computer import ManyBodyComputerQCNG, qcvars_to_manybodyproperties

import qcengine as qcng
from addons import using
from test_mbe_he4_singlelevel import sumdict
from .addons import using
from .test_mbe_he4_singlelevel import sumdict as sumdict_single

def skprop(qcvar):
# qcng: return qcng.procedures.manybody.qcvars_to_manybodyproperties[qcvar]
Expand Down Expand Up @@ -321,6 +321,7 @@ def mbe_data_multilevel_631g():
},
},
}
sumdict = copy.deepcopy(sumdict_single)
sumdict.update(sumdict_multi)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from qcmanybody.models.qcng_computer import ManyBodyComputerQCNG, qcvars_to_manybodyproperties

import qcengine as qcng
from addons import using
from .addons import using

def skprop(qcvar):
# qcng: return qcng.procedures.manybody.qcvars_to_manybodyproperties[qcvar]
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/test_multi.py → qcmanybody/tests/test_multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

from qcmanybody import ManyBodyCalculator
from qcmanybody.models import BsseEnum
from common import mol_h2o_3
from utils import load_ref_data, compare_results, load_component_data
from .common import mol_h2o_3
from .utils import load_ref_data, compare_results, load_component_data


@pytest.mark.parametrize(
Expand Down
4 changes: 2 additions & 2 deletions tests/test_multi_ss.py → qcmanybody/tests/test_multi_ss.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

from qcmanybody import ManyBodyCalculator
from qcmanybody.models import BsseEnum
from common import mol_h2o_3
from utils import load_ref_data, compare_results, load_component_data
from .common import mol_h2o_3
from .utils import load_ref_data, compare_results, load_component_data

this_dir = os.path.dirname(os.path.abspath(__file__))

Expand Down
4 changes: 2 additions & 2 deletions tests/test_single.py → qcmanybody/tests/test_single.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

from qcmanybody import ManyBodyCalculator
from qcmanybody.models import BsseEnum
from common import mol_h2o_3
from utils import load_ref_data, compare_results, load_component_data
from .common import mol_h2o_3
from .utils import load_ref_data, compare_results, load_component_data


@pytest.mark.parametrize(
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/utils.py → qcmanybody/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def load_component_data(file_base):


def generate_component_data(mol, levels, specifications, bsse_type, return_total_data, out_filename):
from qcmanybody.qcengine import run_qcengine_base
from qcmanybody.qcengine_helper import run_qcengine_base

mc, component_results = run_qcengine_base(mol, levels, specifications, bsse_type, return_total_data)

Expand Down

0 comments on commit decc009

Please sign in to comment.