Skip to content

Commit 2656ef7

Browse files
committed
lints
Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
1 parent 11d7636 commit 2656ef7

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

‎tests/unit_tests/utils/test_import_utils.py‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
import sys
1615
import types
1716
from unittest.mock import MagicMock, patch
1817

1918
import pytest
20-
import torch
2119
from packaging.version import Version as PkgVersion
2220

2321
from nemo_lm.utils.import_utils import (
@@ -141,11 +139,6 @@ def test_descriptor_operations_raise_error(self):
141139
"""Test that descriptor operations raise UnavailableError."""
142140
TestClass = UnavailableMeta("TestClass", (), {})
143141

144-
class DummyClass:
145-
prop = TestClass
146-
147-
dummy = DummyClass()
148-
149142
with pytest.raises(UnavailableError):
150143
TestClass.__get__(None, None)
151144

@@ -154,6 +147,8 @@ class DummyClass:
154147

155148

156149
class TestSafeImport:
150+
"""Test suite for the safe_import function."""
151+
157152
def test_successful_import(self):
158153
"""Test safe_import with a module that exists."""
159154
module, success = safe_import("os")
@@ -209,6 +204,8 @@ def test_unavailable_module_raises_error_when_used(self):
209204

210205

211206
class TestSafeImportFrom:
207+
"""Test suite for the safe_import_from function."""
208+
212209
def test_successful_import_from(self):
213210
"""Test safe_import_from with a symbol that exists."""
214211
symbol, success = safe_import_from("os", "path")

0 commit comments

Comments
 (0)