File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ def from_yaml(self, path):
211
211
bundles = YAMLLoader (path ).load_bundles ()
212
212
[self .register (name , bundle ) for name , bundle in bundles .iteritems ()]
213
213
214
- def from_python (self , path ):
214
+ def from_module (self , path ):
215
215
"""Register bundles from a Python module"""
216
216
bundles = PythonLoader (path ).load_bundles ()
217
217
[self .register (name , bundle ) for name , bundle in bundles .iteritems ()]
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ def test_tag_available(self):
23
23
assert t .render () == '/foo/file1;/foo/file2;'
24
24
25
25
def test_from_yaml (self ):
26
- """Test that a yaml configuration gets loaded
26
+ """YAML configuration gets loaded
27
27
"""
28
28
f = open ('test.yaml' , 'w' )
29
29
f .write ("""
@@ -41,14 +41,14 @@ def test_from_yaml(self):
41
41
42
42
os .remove ('test.yaml' )
43
43
44
- def test_from_python (self ):
45
- """Test that a python configuration gets loaded
44
+ def test_from_python_module (self ):
45
+ """Python configuration module gets loaded
46
46
"""
47
47
import types
48
48
module = types .ModuleType ('test' )
49
49
module .pytest = Bundle ('pyfile1' , 'pyfile2' )
50
50
51
- self .env .from_python (module )
51
+ self .env .from_module (module )
52
52
53
53
t = self .app .jinja_env .from_string ('{% assets "pytest" %}{{ASSET_URL}};{% endassets %}' )
54
54
assert t .render () == '/foo/pyfile1;/foo/pyfile2;'
You can’t perform that action at this time.
0 commit comments