Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

register plugin path issues #385

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,29 @@ def test_deregister_plugin_path_pathlib():
for path in input_to_test:
helper_deregister_plugin_path(path)

def helper_create_path_input():
input_to_test = []
input_to_test.append(u"c:\some\special\södär\testpath".encode('utf-8')) # unicode input
input_to_test.append(b'c:\some\special\s\xc3\xb6d\xc3\xa4r\testpath') # bytestring input
input_to_test.append(b"c:\\bytes\\are/cool") # bytestring input
input_to_test.append("c:/just/a/average/path") # string input
input_to_test.append(r"c:\just\a\average\path\v2") # raw string input with different slashes
return input_to_test


def test_register_plugin_path():
"""test various types of input for plugin path registration"""
input_to_test = helper_create_path_input()
for path in input_to_test:
helper_register_plugin_path(path)


def test_deregister_plugin_path_pathlib():
"""test various types of input for plugin path registration"""
input_to_test = helper_create_path_input()
for path in input_to_test:
helper_deregister_plugin_path(path)


@mock.patch("pyblish.plugin.__explicit_process")
def test_implicit_explicit_branching(func):
Expand Down