Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-pipeline
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
django-pipeline
Commits
0db06ec1
Commit
0db06ec1
authored
Feb 16, 2016
by
Timothée Peignier
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #537 from davidt/glob-exists
Don't filter out "missing" files in the glob stage.
parents
373a0f3c
b2be56f9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
8 deletions
+5
-8
pipeline/glob.py
+1
-6
tests/tests/test_glob.py
+0
-1
tests/tests/test_storage.py
+4
-1
No files found.
pipeline/glob.py
View file @
0db06ec1
...
...
@@ -25,12 +25,7 @@ def iglob(pathname):
"""
if
not
has_magic
(
pathname
):
try
:
if
staticfiles_storage
.
exists
(
pathname
):
yield
pathname
except
NotImplementedError
:
# Being optimistic
yield
pathname
yield
pathname
return
dirname
,
basename
=
os
.
path
.
split
(
pathname
)
if
not
dirname
:
...
...
tests/tests/test_glob.py
View file @
0db06ec1
...
...
@@ -55,7 +55,6 @@ class GlobTest(TestCase):
self
.
assertSequenceEqual
(
self
.
glob
(
'a'
),
[
self
.
normpath
(
'a'
)])
self
.
assertSequenceEqual
(
self
.
glob
(
'a'
,
'D'
),
[
self
.
normpath
(
'a'
,
'D'
)])
self
.
assertSequenceEqual
(
self
.
glob
(
'aab'
),
[
self
.
normpath
(
'aab'
)])
self
.
assertSequenceEqual
(
self
.
glob
(
'zymurgy'
),
[])
def
test_glob_one_directory
(
self
):
self
.
assertSequenceEqual
(
...
...
tests/tests/test_storage.py
View file @
0db06ec1
...
...
@@ -6,6 +6,7 @@ from django.core.management import call_command
from
django.test
import
TestCase
from
django.test.utils
import
override_settings
,
modify_settings
from
pipeline.collector
import
default_collector
from
pipeline.storage
import
PipelineStorage
from
tests.tests.test_compiler
import
DummyCompiler
...
...
@@ -49,11 +50,13 @@ class StorageTest(TestCase):
@pipeline_settings
(
JS_COMPRESSOR
=
None
,
CSS_COMPRESSOR
=
None
)
def
test_post_process_dry_run
(
self
):
default_collector
.
collect
()
processed_files
=
PipelineStorage
()
.
post_process
({},
True
)
self
.
assertEqual
(
list
(
processed_files
),
[])
@pipeline_settings
(
JS_COMPRESSOR
=
None
,
CSS_COMPRESSOR
=
None
)
@pipeline_settings
(
JS_COMPRESSOR
=
None
,
CSS_COMPRESSOR
=
None
,
COMPILERS
=
[
'tests.tests.test_storage.DummyCSSCompiler'
]
)
def
test_post_process
(
self
):
default_collector
.
collect
()
storage
=
PipelineStorage
()
processed_files
=
storage
.
post_process
({})
self
.
assertTrue
((
'screen.css'
,
'screen.css'
,
True
)
in
processed_files
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment