Commits

Benji York  committed 7d8910c

- add a buildout config so that it's easier to get a reproducable build and we
get a test runner
- fixed a test bug revealed by using the buildout

  • Participants
  • Parent commits 8ab34d6

Comments (0)

Files changed (5)

 \.py[co]$
 ^build/
 ~$
-
+^bin/
+^parts/
+^tags
+^keyring.egg-info
+^develop-eggs
+^.installed.cfg

File buildout.cfg

+[buildout]
+parts = test interpreter
+develop = .
+allow-picked-versions = false
+use-dependency-links = false
+versions = versions
+
+[test]
+recipe = zc.recipe.testrunner
+eggs = keyring
+defaults = '--tests-pattern tests --exit-with-status'.split()
+working-directory = .
+
+[interpreter]
+recipe = zc.recipe.egg
+eggs = keyring
+interpreter = py
+
+[versions]
+# Maintain blank line below this comment to facilitate sorting.  (Vim: place
+# cursor anywhere in the version list and (in normal mode) type "vip:sort"
+# without the quotes.)
+
+setuptools = 0.6c11
+z3c.recipe.scripts = 1.0.1
+zc.buildout = 1.5.2
+zc.recipe.egg = 1.3.2
+zc.recipe.testrunner = 1.4.0
+zope.exceptions = 3.6.1
+zope.interface = 3.6.1
+zope.testrunner = 4.0.0

File keyring/backend.py

 except ImportError:
     kwallet = None
 else:
-    kewllet = open_kwallet()
+    kwallet = open_kwallet()
 
 
 class KDEKWallet(KeyringBackend):

File keyring/tests/test_backend.py

 
     __test__ = False
 
-    def init_keyring(self):
-        return None
-
     def setUp(self):
         self.keyring = self.init_keyring()
 

File keyring/tests/test_core.py

         # create the config file
         config_file = open(KEYRINGRC,'w')
         config_file.writelines(["[backend]\n",
-                  # the path for the user created keyring
-                  "keyring-path= %s\n" % str(os.path.abspath(__file__))[:-16],
-                  # the name of the keyring class
-                  "default-keyring=test_core.TestKeyring2\n" ])
+            # the path for the user created keyring
+            "keyring-path= %s\n" % os.path.dirname(os.path.abspath(__file__)),
+            # the name of the keyring class
+            "default-keyring=test_core.TestKeyring2\n" ])
         config_file.close()
 
         # init the keyring lib, the lib will automaticlly load the
 
         keyring.core.set_password("test", "user", "password")
         self.assertEqual(keyring.core.get_password("test", "user"),
-                                                               PASSWORD_TEXT_2)
+            PASSWORD_TEXT_2)
 
         os.remove(KEYRINGRC)