added support for rpm packaging and basic support for deb

This commit is contained in:
root
2017-03-29 18:01:35 +02:00
parent ce758e8129
commit 783e7e6d0d
33 changed files with 3455 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
import unittest
from huey.utils import wrap_exception
class MyException(Exception):
pass
class TestWrapException(unittest.TestCase):
def test_wrap_exception(self):
def raise_keyerror():
try:
{}['huey']
except KeyError as exc:
raise wrap_exception(MyException)
self.assertRaises(MyException, raise_keyerror)
try:
raise_keyerror()
except MyException as exc:
self.assertEqual(str(exc), "KeyError: 'huey'")
else:
assert False