mirror of
https://github.com/ammaraskar/pyCraft.git
synced 2024-11-16 07:15:24 +01:00
Added tests for YggdrasilError
This commit is contained in:
parent
ca81f7685a
commit
6daca43748
15
tests/test_exceptions.py
Normal file
15
tests/test_exceptions.py
Normal file
@ -0,0 +1,15 @@
|
||||
from minecraft.exceptions import YggdrasilError
|
||||
|
||||
import unittest
|
||||
|
||||
|
||||
class RaiseYggdrasilError(unittest.TestCase):
|
||||
def test_raise_yggdrasil_error(self):
|
||||
with self.assertRaises(YggdrasilError):
|
||||
raise YggdrasilError
|
||||
|
||||
def test_raise_yggdrasil_error_message(self):
|
||||
with self.assertRaises(YggdrasilError) as e:
|
||||
raise YggdrasilError("Error!")
|
||||
|
||||
self.assertEqual(str(e.exception), "Error!")
|
Loading…
Reference in New Issue
Block a user