Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/sallai/mbuild into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ctk3b committed Dec 11, 2014
2 parents 9fc33d2 + 3193518 commit 82dfe2a
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mbuild/tests/test_compound.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

class TestCompound:

@pytest.fixture(autouse=True)
def initdir(self, tmpdir):
tmpdir.chdir()

def test_load_and_create(self):
Compound.load(get_fn('methyl.pdb'))

Expand Down
6 changes: 6 additions & 0 deletions mbuild/tests/test_examples.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@
# -*- coding: utf-8 -*-

"""Tests for `mbuild.examples` module. """
import pytest


class TestExamples:

@pytest.fixture(autouse=True)
def initdir(self, tmpdir):
tmpdir.chdir()


def test_alkane(self):
import mbuild.examples.alkane.alkane as example
example.main()
Expand Down
4 changes: 4 additions & 0 deletions mbuild/tests/test_examples_methane.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

class TestExamplesMethane:

@pytest.fixture(autouse=True)
def initdir(self, tmpdir):
tmpdir.chdir()

@pytest.fixture
def methane(self):
from mbuild.examples.methane.methane import Methane
Expand Down
4 changes: 4 additions & 0 deletions mbuild/tests/test_gromacs.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

class TestGromacs:

@pytest.fixture(autouse=True)
def initdir(self, tmpdir):
tmpdir.chdir()

@pytest.fixture
def ethane(self):
from mbuild.examples.ethane.ethane import Ethane
Expand Down
3 changes: 3 additions & 0 deletions mbuild/tests/test_hoomdxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@


class TestHoomdXml:
@pytest.fixture(autouse=True)
def initdir(self, tmpdir):
tmpdir.chdir()

@pytest.fixture
def molecule(self):
Expand Down
5 changes: 5 additions & 0 deletions mbuild/tests/test_mbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
# -*- coding: utf-8 -*-

"""Tests for `mbuild` module. """
import pytest

class TestMbuild:

@pytest.fixture(autouse=True)
def initdir(self, tmpdir):
tmpdir.chdir()

def setUp(self):
pass

Expand Down
5 changes: 5 additions & 0 deletions mbuild/tests/test_mol2file.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@
# -*- coding: utf-8 -*-

"""Tests for `mbuild.formats.mol2` module. """
import pytest
from mbuild.examples.ethane.methyl import Methyl
from mbuild.trajectory import Trajectory
from mbuild.testing.tools import get_fn


class TestMol2:

@pytest.fixture(autouse=True)
def initdir(self, tmpdir):
tmpdir.chdir()

def test_load_and_create(self):
methyl = Trajectory.load(get_fn('methyl.mol2'))
methyl.to_compound()
Expand Down
5 changes: 5 additions & 0 deletions mbuild/tests/test_opls.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@

import glob
import os
import pytest

from mbuild.testing.tools import load_top_opls
from mbuild.tools.parameterize.atomtyper import find_atomtypes


class TestTools:

@pytest.fixture(autouse=True)
def initdir(self, tmpdir):
tmpdir.chdir()

def test_all_molecules(self, only_run=None):
# Path doesn't work for py.test and is probably bad practice anyways.
top_files = glob.glob('../../opls_validation/*.top')
Expand Down
5 changes: 5 additions & 0 deletions mbuild/tests/test_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-

"""Tests for `mbuild.tools` module. """
import pytest
import numpy as np

from mbuild.trajectory import Trajectory
Expand All @@ -10,6 +11,10 @@

class TestTools:

@pytest.fixture(autouse=True)
def initdir(self, tmpdir):
tmpdir.chdir()

def test_center_of_mass(self):
e_ceramide_ns = Trajectory.load(get_fn('e-ceramide-ns.pdb'))

Expand Down
4 changes: 4 additions & 0 deletions mbuild/tests/test_xyz.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

class TestXyz:

@pytest.fixture(autouse=True)
def initdir(self, tmpdir):
tmpdir.chdir()

@pytest.fixture
def ethane(self):
from mbuild.examples.ethane.ethane import Ethane
Expand Down

0 comments on commit 82dfe2a

Please sign in to comment.