1. Daniel Holth
  2. Python Keyring Lib

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).

  • Participants
  • Parent commits 87b6c72
  • Branches default
  • Tags 0.9.2

Comments (0)

Files changed (1)

File keyring/tests/test_core.py

View file
             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)