diff options
| author | Steffen Moeller <moeller@debian.org> | 2025-10-03 16:07:11 +0100 |
|---|---|---|
| committer | git-ubuntu importer <ubuntu-devel-discuss@lists.ubuntu.com> | 2025-10-28 22:36:18 +0000 |
| commit | 8ed8247f0973f900898167c0eebf94825504b2ce (patch) | |
| tree | 9ab3f04e1ae81543bbd7fdce37786a2cc34f35c7 /test/test_model.py | |
1.5-1 (patches unapplied)HEADimport/1.5-1ubuntu/resolute-proposedubuntu/resolute-develubuntu/resoluteubuntu/develdebian/sid
Imported using git-ubuntu import.
Notes
Notes:
Diffstat (limited to 'test/test_model.py')
| -rw-r--r-- | test/test_model.py | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/test_model.py b/test/test_model.py new file mode 100644 index 0000000..6e9e3fd --- /dev/null +++ b/test/test_model.py @@ -0,0 +1,33 @@ +import utils +import os +import unittest + +TOPDIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) +utils.set_search_paths(TOPDIR) +import modelcif.model + + +class Tests(unittest.TestCase): + def test_model(self): + """Test Model classes""" + m = modelcif.model.HomologyModel([]) + self.assertEqual(m.model_type, "Homology model") + self.assertIsNone(m.other_details) + + # generic "other" model + m = modelcif.model.Model([]) + self.assertEqual(m.model_type, "Other") + self.assertIsNone(m.other_details) + + # custom "other" model + class CustomRef(modelcif.model.Model): + """foo + bar""" + + m = CustomRef([]) + self.assertEqual(m.model_type, "Other") + self.assertEqual(m.other_details, "foo") + + +if __name__ == '__main__': + unittest.main() |
