Skip to content

Commit 535843c

Browse files
author
LittleCoinCoin
committed
refactor(test): mark tests taking around 30 secs as slow
1 parent 7179d31 commit 535843c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/test_non_tty_integration.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from pathlib import Path
1212
from unittest.mock import patch
1313
from hatch.environment_manager import HatchEnvironmentManager
14-
from wobble.decorators import integration_test
14+
from wobble.decorators import integration_test, slow_test
1515
from test_data_utils import NonTTYTestDataLoader, TestDataLoader
1616

1717

@@ -34,6 +34,7 @@ def _cleanup_temp_dir(self):
3434
shutil.rmtree(self.temp_dir, ignore_errors=True)
3535

3636
@integration_test(scope="component")
37+
@slow_test
3738
@patch('sys.stdin.isatty', return_value=False)
3839
def test_cli_package_add_non_tty(self, mock_isatty):
3940
"""Test package addition in non-TTY environment via CLI."""
@@ -58,6 +59,7 @@ def test_cli_package_add_non_tty(self, mock_isatty):
5859
mock_isatty.assert_called()
5960

6061
@integration_test(scope="component")
62+
@slow_test
6163
@patch.dict(os.environ, {'HATCH_AUTO_APPROVE': '1'})
6264
def test_environment_variable_integration(self):
6365
"""Test HATCH_AUTO_APPROVE environment variable integration."""
@@ -81,6 +83,7 @@ def test_environment_variable_integration(self):
8183
self.assertTrue(result, "Package addition should succeed with HATCH_AUTO_APPROVE")
8284

8385
@integration_test(scope="component")
86+
@slow_test
8487
@patch('sys.stdin.isatty', return_value=False)
8588
def test_multiple_package_installation_non_tty(self, mock_isatty):
8689
"""Test multiple package installation in non-TTY environment."""
@@ -110,6 +113,7 @@ def test_multiple_package_installation_non_tty(self, mock_isatty):
110113
self.assertTrue(result2, "Second package installation should succeed")
111114

112115
@integration_test(scope="component")
116+
@slow_test
113117
@patch.dict(os.environ, {'HATCH_AUTO_APPROVE': 'true'})
114118
def test_environment_variable_case_insensitive_integration(self):
115119
"""Test case-insensitive environment variable in full integration."""
@@ -131,6 +135,7 @@ def test_environment_variable_case_insensitive_integration(self):
131135
self.assertTrue(result, "Package addition should succeed with case-insensitive env var")
132136

133137
@integration_test(scope="component")
138+
@slow_test
134139
@patch('sys.stdin.isatty', return_value=True)
135140
@patch.dict(os.environ, {'HATCH_AUTO_APPROVE': 'invalid'})
136141
@patch('builtins.input', return_value='y')
@@ -175,6 +180,7 @@ def _cleanup_temp_dir(self):
175180
shutil.rmtree(self.temp_dir, ignore_errors=True)
176181

177182
@integration_test(scope="component")
183+
@slow_test
178184
@patch('sys.stdin.isatty', return_value=True)
179185
@patch('builtins.input', side_effect=KeyboardInterrupt())
180186
def test_keyboard_interrupt_integration(self, mock_input, mock_isatty):
@@ -198,6 +204,7 @@ def test_keyboard_interrupt_integration(self, mock_input, mock_isatty):
198204
self.assertFalse(result, "Package installation should be cancelled by user")
199205

200206
@integration_test(scope="component")
207+
@slow_test
201208
@patch('sys.stdin.isatty', return_value=True)
202209
@patch('builtins.input', side_effect=EOFError())
203210
def test_eof_error_integration(self, mock_input, mock_isatty):
@@ -240,6 +247,7 @@ def _cleanup_temp_dir(self):
240247
shutil.rmtree(self.temp_dir, ignore_errors=True)
241248

242249
@integration_test(scope="component")
250+
@slow_test
243251
def test_all_valid_environment_variables_integration(self):
244252
"""Test all valid environment variable values in integration."""
245253
# Create test environment

0 commit comments

Comments
 (0)