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

SG-38267 Replace mock #1010

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
12 changes: 5 additions & 7 deletions tests/platform_tests/test_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,18 @@

from __future__ import with_statement

import sys
import inspect
import logging
import os
import shutil
import logging
import tempfile
import mock
import inspect
from unittest import mock

from tank_test.tank_test_base import *
import tank
from tank.errors import TankError, TankHookMethodDoesNotExistError
from tank.platform import application, constants, validation
from tank.platform import application, validation
from tank.template import Template
from tank.deploy import descriptor
from tank_test.tank_test_base import *
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'from tank_test.tank_test_base import *' used; unable to detect undefined names

from tank_vendor import six
from tank_vendor.six import StringIO

Expand Down
19 changes: 9 additions & 10 deletions tests/platform_tests/test_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,26 @@
Engine-related unit tests.
"""

from __future__ import with_statement, print_function
from __future__ import print_function, with_statement

import contextlib
import os
import random
import sys
import threading
import random
import time
from unittest import mock

import sgtk
import tank
from sgtk.platform import engine
from tank.errors import TankError
from tank_test.tank_test_base import setUpModule # noqa
from tank_test.tank_test_base import (
TankTestBase,
skip_if_pyside_missing,
suppress_generated_code_qt_warnings,
)
from tank_test.tank_test_base import setUpModule # noqa

import contextlib
import tank
import sgtk
from sgtk.platform import engine
from tank.errors import TankError
import mock


class TestEngineBase(TankTestBase):
Expand Down
8 changes: 3 additions & 5 deletions tests/python/tank_test/mock_appstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,15 @@

import functools
import sys
from unittest import mock

import mock

from sgtk.descriptor import Descriptor
from sgtk.descriptor import Descriptor, create_descriptor
from sgtk.descriptor.io_descriptor.base import IODescriptorBase
from sgtk.descriptor import create_descriptor
from sgtk.util import sgre as re

from tank import TankError
from tank.platform.environment import InstalledEnvironment
from tank.util import suppress_known_deprecation

if sys.version_info[0:2] >= (3, 10):
from setuptools._distutils.version import LooseVersion
else:
Expand Down
Loading