Răsfoiți Sursa

Some corrections

Adrien Ferrand 6 ani în urmă
părinte
comite
ca76f3c350
2 a modificat fișierele cu 7 adăugiri și 3 ștergeri
  1. 1 1
      nsist/pypi.py
  2. 6 2
      nsist/tests/test_local_wheels.py

+ 1 - 1
nsist/pypi.py

@@ -270,7 +270,7 @@ def fetch_pypi_wheels(wheels_requirements, wheels_paths, target_dir, py_version,
         paths = glob.glob(glob_path)
         if not paths:
             raise ValueError('Error, glob path {0} does not match any wheel file'.format(glob_path))
-        for path in glob.glob(glob_path):
+        for path in paths:
             logger.info('Collecting wheel file: %s (from: %s)', os.path.basename(path), glob_path)
             validate_wheel(path, distributions, py_version, bitness)
             extract_wheel(path, target_dir, exclude=exclude)

+ 6 - 2
nsist/tests/test_local_wheels.py

@@ -59,6 +59,10 @@ class TestLocalWheels(unittest.TestCase):
     def test_useless_wheel_glob_path_raise(self):
         with TemporaryDirectory() as td1:
             with TemporaryDirectory() as td2:
-                with self.assertRaisesRegex(ValueError, 'does not match any wheel file'
-                .format(td1)):
+                with self.assertRaisesRegex(ValueError, 'does not match any wheel file'):
                     fetch_pypi_wheels([], [os.path.join(td1, '*.whl')], td2, platform.python_version(), 64)
+
+
+# To exclude these, run:  nosetests -a '!network'
+TestLocalWheels.test_matching_one_pattern.network = 1
+TestLocalWheels.test_duplicate_wheel_files_raise.network = 1