Commits

Jason R. Coombs committed 5038d4d

Ensure that the keyring module is not found in the current directory (such as when running tests on Python 3 in the build directory).

Comments (0)

Files changed (1)

keyring/tests/test_core.py

             f.write('[test config]\n')
 
         # invoke load_config in a subprocess
-        cmd = [sys.executable, '-c', 'import keyring.core; keyring.core.load_config()']
+        cmd = [sys.executable, '-c', 'import sys; sys.path.remove(""); '
+            'import keyring.core; keyring.core.load_config()']
         proc = subprocess.Popen(cmd, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
         stdout, stderr = proc.communicate()
+        assert proc.returncode == 0, stderr
 
         try:
             assert not os.path.exists(self.legacy_location)