Skip to content

Commit 0db06ec

Browse files
committed
Merge pull request jazzband#537 from davidt/glob-exists
Don't filter out "missing" files in the glob stage.
2 parents 373a0f3 + b2be56f commit 0db06ec

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

pipeline/glob.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,7 @@ def iglob(pathname):
2525
2626
"""
2727
if not has_magic(pathname):
28-
try:
29-
if staticfiles_storage.exists(pathname):
30-
yield pathname
31-
except NotImplementedError:
32-
# Being optimistic
33-
yield pathname
28+
yield pathname
3429
return
3530
dirname, basename = os.path.split(pathname)
3631
if not dirname:

tests/tests/test_glob.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ def test_glob_literal(self):
5555
self.assertSequenceEqual(self.glob('a'), [self.normpath('a')])
5656
self.assertSequenceEqual(self.glob('a', 'D'), [self.normpath('a', 'D')])
5757
self.assertSequenceEqual(self.glob('aab'), [self.normpath('aab')])
58-
self.assertSequenceEqual(self.glob('zymurgy'), [])
5958

6059
def test_glob_one_directory(self):
6160
self.assertSequenceEqual(

tests/tests/test_storage.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from django.test import TestCase
77
from django.test.utils import override_settings, modify_settings
88

9+
from pipeline.collector import default_collector
910
from pipeline.storage import PipelineStorage
1011

1112
from tests.tests.test_compiler import DummyCompiler
@@ -49,11 +50,13 @@ def tearDown(self):
4950

5051
@pipeline_settings(JS_COMPRESSOR=None, CSS_COMPRESSOR=None)
5152
def test_post_process_dry_run(self):
53+
default_collector.collect()
5254
processed_files = PipelineStorage().post_process({}, True)
5355
self.assertEqual(list(processed_files), [])
5456

55-
@pipeline_settings(JS_COMPRESSOR=None, CSS_COMPRESSOR=None)
57+
@pipeline_settings(JS_COMPRESSOR=None, CSS_COMPRESSOR=None, COMPILERS=['tests.tests.test_storage.DummyCSSCompiler'])
5658
def test_post_process(self):
59+
default_collector.collect()
5760
storage = PipelineStorage()
5861
processed_files = storage.post_process({})
5962
self.assertTrue(('screen.css', 'screen.css', True) in processed_files)

0 commit comments

Comments
 (0)