-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
81 additions
and
12 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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
cover | ||
.coverage | ||
examples/maya/private** | ||
examples/maya/public** |
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,9 @@ | ||
[nosetests] | ||
verbosity=2 | ||
with-doctest=1 | ||
with-coverage=1 | ||
exclude=vendor | ||
cover-html=1 | ||
cover-erase=1 | ||
cover-tests=1 | ||
cover-package=pyblish_starter |
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 |
---|---|---|
@@ -1,13 +1,20 @@ | ||
from .pipeline import ( | ||
ls, | ||
setup, | ||
install, | ||
register_root, | ||
register_loader, | ||
register_creator, | ||
register_plugins, | ||
format_private_dir, | ||
) | ||
|
||
|
||
__all__ = [ | ||
"ls", | ||
"setup", | ||
"install", | ||
"register_plugins", | ||
"register_root", | ||
"register_loader", | ||
"register_creator", | ||
"format_private_dir", | ||
] |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
import pyblish_starter | ||
pyblish_starter.setup() | ||
pyblish_starter.install() |
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,33 @@ | ||
import os | ||
import sys | ||
import shutil | ||
import tempfile | ||
|
||
import pyblish_starter | ||
|
||
self = sys.modules[__name__] | ||
|
||
|
||
def setup(): | ||
self.tempdir = tempfile.mkdtemp() | ||
sys.stdout.write("Created temporary directory \"%s\"" % self.tempdir) | ||
|
||
|
||
def teardown(): | ||
shutil.rmtree(self.tempdir) | ||
sys.stdout.write("Removed temporary directory \"%s\"" % self.tempdir) | ||
|
||
|
||
def test_ls(): | ||
"""ls() returns available assets from current root directory""" | ||
root = os.path.join( | ||
self.tempdir, | ||
"public" | ||
) | ||
|
||
for asset in ("Asset1", "Asset2"): | ||
os.makedirs(os.path.join(root, asset)) | ||
|
||
pyblish_starter.register_root(self.tempdir) | ||
|
||
assert pyblish_starter.ls() == ["Asset1", "Asset2"] |
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,18 @@ | ||
import sys | ||
import time | ||
import types | ||
|
||
maya = types.ModuleType("maya") | ||
maya.mel = types.ModuleType("mel") | ||
maya.cmds = types.ModuleType("cmds") | ||
|
||
maya.cmds.ls = lambda *args, **kwargs: ["pCube1"] | ||
maya.mel.eval = lambda string: None | ||
|
||
sys.modules["maya"] = maya | ||
|
||
if __name__ == '__main__': | ||
import nose | ||
argv = sys.argv[:] | ||
argv.extend(['-c', '.noserc']) | ||
nose.main(argv=argv) |