Attempt to speed up Steam even more. Sound for link added.
This commit is contained in:
1 parent
ee4292564a
commit
6e049e35e2
10 files changed
+349
-11
No files matched your search
@@ -0,0 +1,28 @@
|
||||
import sys
|
||||
import unittest
|
||||
from unittest import mock
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "src"))
|
||||
|
||||
from cthulhu import debug
|
||||
from cthulhu.script_utilities import Utilities
|
||||
|
||||
|
||||
class ScriptUtilitiesRegressionTests(unittest.TestCase):
|
||||
@mock.patch("cthulhu.script_utilities.AXObject.get_application")
|
||||
def test_can_be_active_window_skips_cmdline_lookup_without_info_logging(self, get_application):
|
||||
utility = object.__new__(Utilities)
|
||||
utility._getAppCommandLine = mock.Mock(side_effect=AssertionError("cmdline lookup should be skipped"))
|
||||
utility._isActiveAndShowingAndNotIconified = mock.Mock(return_value=True)
|
||||
|
||||
window = object()
|
||||
app = object()
|
||||
get_application.return_value = app
|
||||
|
||||
with mock.patch.object(debug, "debugLevel", debug.LEVEL_SEVERE):
|
||||
self.assertTrue(utility.canBeActiveWindow(window))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user