Permalink
Browse files

from balanced import * works and now there are tests

  • Loading branch information...
1 parent cbe930a commit cc1597579a07993d31578e9ab7d0a2ece43ef4e4 @mahmoudimus mahmoudimus committed May 22, 2012
Showing with 18 additions and 3 deletions.
  1. +3 −3 balanced/__init__.py
  2. +15 −0 tests/test_balanced.py
View
@@ -1,5 +1,4 @@
-__version__ = '0.8.3'
-
+__version__ = '0.8.4'
import contextlib
@@ -10,6 +9,7 @@
Merchant, Transaction, BankAccount, Card)
from balanced import exc
+
__all__ = [
Resource.__name__,
Marketplace.__name__,
@@ -23,7 +23,7 @@
Transaction.__name__,
Card.__name__,
BankAccount.__name__,
- exc.__name__,
+ exc.__name__.partition('.')[-1],
]
http_client = HTTPClient()
View
@@ -0,0 +1,15 @@
+import unittest
+
+
+class TestBalancedImportStar(unittest.TestCase):
+
+ def test_import_star(self):
+ # not sure who uses import * any more, but we should
+ # test this
+ try:
+ # the __import__ doesn't do what I want here.
+ # and doing a "from balanced import *" generates an
+ # unsupressable SyntaxWarning.
+ exec "from balanced import *" # pylint: disable-msg=W0122
+ except Exception, exc:
+ raise ImportError("%s" % exc)

0 comments on commit cc15975

Please sign in to comment.