[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] Enumerate files when unable to find site-packages



commit e0ceb18bc459ed120383fb83ac1bdc382a6324f3
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Wed Apr 8 18:34:23 2020 -0700

    Enumerate files when unable to find site-packages
    
    Closer, but Jenkins evidently installs to a different path. We need to adjust
    our glob pattern but first I need to expand this failure message so we know
    what it should be.
    
      ======================================================================
      FAIL: test_install
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/srv/jenkins-workspace/workspace/stem-tor-ci/stem/util/test_tools.py", line 141, in <lambda>
          self.method = lambda test: self.result(test)  # method that can be mixed into TestCases
        File "/srv/jenkins-workspace/workspace/stem-tor-ci/stem/util/test_tools.py", line 208, in result
          test.fail(self._result.msg)
      AssertionError: We should only have a single site-packages directory, but instead had: []
    
      ----------------------------------------------------------------------
---
 test/integ/installation.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/test/integ/installation.py b/test/integ/installation.py
index 657b5d88..8402ea32 100644
--- a/test/integ/installation.py
+++ b/test/integ/installation.py
@@ -100,7 +100,10 @@ class TestInstallation(unittest.TestCase):
 
         raise AssertionError('\n'.join(msg))
 
-      if len(site_packages_paths) != 1:
+      if not site_packages_paths:
+        all_files = glob.glob('%s/**' % BASE_INSTALL_PATH, recursive = True)
+        raise AssertionError('Unable to find site-packages, files include:\n\n%s' % '\n'.join(all_files))
+      elif len(site_packages_paths) > 1:
         raise AssertionError('We should only have a single site-packages directory, but instead had: %s' % site_packages_paths)
 
       install_path = site_packages_paths[0]

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits