-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from pelson/phased_implementation
Added a DirectoryDestination for new build distributions to be placed into, and provided a ``list_metas`` function
- Loading branch information
Showing
7 changed files
with
146 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ requirements: | |
- setuptools | ||
- conda | ||
- conda-build | ||
- anaconda-client | ||
|
||
test: | ||
imports: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import os | ||
import shutil | ||
import tempfile | ||
import unittest | ||
import textwrap | ||
|
||
import conda_build.config | ||
from conda_build.metadata import MetaData | ||
|
||
from conda_build_all.builder import list_metas | ||
from conda_build_all.tests.integration.test_builder import RecipeCreatingUnit | ||
|
||
|
||
class Test_list_metas(RecipeCreatingUnit): | ||
def setUp(self): | ||
super(Test_list_metas, self).setUp() | ||
m1 = self.write_meta('m1', """ | ||
package: | ||
name: m1 | ||
""") | ||
m2 = self.write_meta('.', """ | ||
package: | ||
name: m2 | ||
""") | ||
m3 = self.write_meta('d1/d2/d3/meta3', """ | ||
package: | ||
name: m3 | ||
""") | ||
m4 = self.write_meta('da1/da2/da3/meta4', """ | ||
package: | ||
name: m4 | ||
""") | ||
|
||
def test_depth_0(self): | ||
metas = list_metas(self.recipes_root_dir, max_depth=0) | ||
names = [meta.name() for meta in metas] | ||
self.assertEqual(sorted(names), ['m1', 'm2', 'm3', 'm4']) | ||
|
||
def test_depth_m1(self): | ||
metas = list_metas(self.recipes_root_dir, max_depth=-1) | ||
names = [meta.name() for meta in metas] | ||
self.assertEqual(sorted(names), ['m1', 'm2', 'm3', 'm4']) | ||
|
||
def test_depth_1(self): | ||
metas = list_metas(self.recipes_root_dir, max_depth=1) | ||
names = [meta.name() for meta in metas] | ||
self.assertEqual(sorted(names), ['m2']) | ||
|
||
def test_depth_2(self): | ||
metas = list_metas(self.recipes_root_dir, max_depth=2) | ||
names = [meta.name() for meta in metas] | ||
self.assertEqual(sorted(names), ['m1', 'm2']) | ||
|
||
def test_default_depth(self): | ||
metas = list_metas(self.recipes_root_dir) | ||
names = [meta.name() for meta in metas] | ||
self.assertEqual(sorted(names), ['m1', 'm2', 'm3', 'm4']) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |