-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #851 from chrisjonesBSU/fix/molecule
Fix `__repr__` method in `abstract_site.Molecule` and `abstract_site.Residue`
- Loading branch information
Showing
2 changed files
with
34 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import pytest | ||
|
||
from gmso.abc.abstract_site import Molecule, Residue, Site | ||
from gmso.tests.base_test import BaseTest | ||
|
||
|
||
class TestSite(BaseTest): | ||
def test_molecule(self): | ||
molecule = Molecule() | ||
molecule.__repr__() | ||
assert molecule.number == 0 | ||
assert molecule.isrigid is False | ||
|
||
def test_residue(self): | ||
residue = Residue() | ||
residue.__repr__() | ||
assert residue.number == 0 | ||
|
||
def test_site(self): | ||
with pytest.raises(TypeError): | ||
Site() |