Skip to content

Commit

Permalink
FIXUP: fixing unittest for loading from label
Browse files Browse the repository at this point in the history
  • Loading branch information
mazeau committed Oct 5, 2020
1 parent 0796882 commit 6702156
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions rmgpy/data/surfaceTest.py
Expand Up @@ -31,9 +31,9 @@
from unittest import TestCase, TestLoader, TextTestRunner

from rmgpy import settings
from rmgpy.data.base import Entry
from rmgpy.data.surface import MetalDatabase
from rmgpy.data.base import Database, Entry, DatabaseError
from rmgpy.data.base import Entry #DatabaseError
from rmgpy.exceptions import DatabaseError

###################################################

Expand Down Expand Up @@ -80,8 +80,9 @@ def test_load_from_label(self):
test_pt111 = "Pt111"
self.assertIsNotNone(self.database.get_binding_energies(test_pt111))

test_noexistent = "Pt000"
self.assertRaises(DatabaseError, self.database.get_binding_energies(test_noexistent))
test_notexistent = "Pt000"
with self.assertRaises(DatabaseError):
self.database.get_binding_energies(test_notexistent)

def test_load_all_entries_on_one_metal(self):
"""Test we can load all entries from the database on one metal"""
Expand Down

0 comments on commit 6702156

Please sign in to comment.