diff --git a/tests/test_3141596.py b/tests/test_3141596.py index bc074c8f..06fd3772 100644 --- a/tests/test_3141596.py +++ b/tests/test_3141596.py @@ -7,8 +7,6 @@ from unittest import skipIf from unittesting import AWAIT_WORKER from unittesting import DeferrableTestCase -from unittesting.helpers import TempDirectoryTestCase -from unittesting.helpers import ViewTestCase from unittesting.utils import isiterable BASEDIR = os.path.dirname(os.path.abspath(__file__)) @@ -199,23 +197,3 @@ def test_fail_color_scheme(self, txt): @with_package("_ColorScheme_Success", color_scheme_test=True) def test_success_color_scheme(self, txt): self.assertOk(txt) - - -def tidy_path(path): - return os.path.realpath(os.path.normcase(path)) - - -class TestTempDirectoryTestCase(TempDirectoryTestCase): - - def test_temp_dir(self): - self.assertTrue( - tidy_path(self._temp_dir), - tidy_path(self.window.folders()[0]) - ) - - -class TestViewTestCase(ViewTestCase): - - def test_view(self): - self.assertIsInstance(self.view, sublime.View) - self.assertTrue(self.view.is_valid()) diff --git a/tests/test_deferrable_view_test_case.py b/tests/test_deferrable_view_test_case.py index d4affa1e..6897e613 100644 --- a/tests/test_deferrable_view_test_case.py +++ b/tests/test_deferrable_view_test_case.py @@ -1,4 +1,5 @@ import sublime + from unittesting import DeferrableViewTestCase @@ -9,6 +10,7 @@ def test_window_object(self): def test_view_object(self): self.assertIsInstance(self.view, sublime.View) + self.assertTrue(self.view.is_valid()) def test_view_settings(self): for key, value in self.view_settings.items(): diff --git a/tests/test_directory_test_case.py b/tests/test_directory_test_case.py new file mode 100644 index 00000000..ab2e700c --- /dev/null +++ b/tests/test_directory_test_case.py @@ -0,0 +1,16 @@ +import os + +from unittesting import TempDirectoryTestCase + + +def tidy_path(path): + return os.path.realpath(os.path.normcase(path)) + + +class TestTempDirectoryTestCase(TempDirectoryTestCase): + + def test_temp_dir(self): + self.assertTrue( + tidy_path(self._temp_dir), + tidy_path(self.window.folders()[0]) + ) diff --git a/tests/test_view_test_case.py b/tests/test_view_test_case.py index a2ce0ad0..7142e0d2 100644 --- a/tests/test_view_test_case.py +++ b/tests/test_view_test_case.py @@ -1,4 +1,5 @@ import sublime + from unittesting import ViewTestCase @@ -9,6 +10,7 @@ def test_window_object(self): def test_view_object(self): self.assertIsInstance(self.view, sublime.View) + self.assertTrue(self.view.is_valid()) def test_view_settings(self): for key, value in self.view_settings.items():