diff options
| author | robot-contrib <[email protected]> | 2023-11-08 08:02:42 +0300 |
|---|---|---|
| committer | robot-contrib <[email protected]> | 2023-11-08 08:31:37 +0300 |
| commit | fd01b46f68dae86217fed11f93dbdce52d09fae5 (patch) | |
| tree | c5c6b0d8e04a284b719fd6ef186973a922f6529a /contrib/python/traitlets/py3/tests | |
| parent | c29324adfbbd2c4bafa31109bc5890e9771fd541 (diff) | |
Update contrib/python/traitlets/py3 to 5.12.0
Diffstat (limited to 'contrib/python/traitlets/py3/tests')
4 files changed, 14 insertions, 19 deletions
diff --git a/contrib/python/traitlets/py3/tests/_warnings.py b/contrib/python/traitlets/py3/tests/_warnings.py index e3c3a0ac6d6..1fb6e9a9a57 100644 --- a/contrib/python/traitlets/py3/tests/_warnings.py +++ b/contrib/python/traitlets/py3/tests/_warnings.py @@ -38,7 +38,7 @@ def all_warnings(): """ # Whenever a warning is triggered, Python adds a __warningregistry__ - # member to the *calling* module. The exercize here is to find + # member to the *calling* module. The exercise here is to find # and eradicate all those breadcrumbs that were left lying around. # # We proceed by first searching all parent calling frames and explicitly @@ -88,7 +88,7 @@ def expected_warnings(matching): Raises a ValueError if any match was not found or an unexpected warning was raised. Allows for three types of behaviors: "and", "or", and "optional" matches. - This is done to accomodate different build enviroments or loop conditions + This is done to accommodate different build environments or loop conditions that may produce different warnings. The behaviors can be combined. If you pass multiple patterns, you get an orderless "and", where all of the warnings must be raised. diff --git a/contrib/python/traitlets/py3/tests/config/test_application.py b/contrib/python/traitlets/py3/tests/config/test_application.py index 610cafc3cd5..94427d6b38f 100644 --- a/contrib/python/traitlets/py3/tests/config/test_application.py +++ b/contrib/python/traitlets/py3/tests/config/test_application.py @@ -14,7 +14,7 @@ import sys import typing as t from io import StringIO from tempfile import TemporaryDirectory -from unittest import TestCase +from unittest import TestCase, mock import pytest from pytest import mark @@ -25,11 +25,6 @@ from traitlets.config.configurable import Configurable from traitlets.config.loader import Config, KVArgParseConfigLoader from traitlets.tests.utils import check_help_all_output, check_help_output, get_output_error_code -try: - from unittest import mock -except ImportError: - from unittest import mock - pjoin = os.path.join @@ -665,7 +660,7 @@ class TestApplication(TestCase): with self.assertRaises(AttributeError): app.loaded_config_files = "/foo" # type:ignore - # ensure it can't be udpated via append + # ensure it can't be updated via append app.loaded_config_files.append("/bar") self.assertEqual(len(app.loaded_config_files), 1) diff --git a/contrib/python/traitlets/py3/tests/config/test_loader.py b/contrib/python/traitlets/py3/tests/config/test_loader.py index 3a1f96120f7..9d864317bcd 100644 --- a/contrib/python/traitlets/py3/tests/config/test_loader.py +++ b/contrib/python/traitlets/py3/tests/config/test_loader.py @@ -629,7 +629,7 @@ class TestConfig(TestCase): """ With multiple config files (systemwide and users), we want compounding. - If systemwide overwirte and user append, we want both in the right + If systemwide overwrite and user append, we want both in the right order. """ c1 = Config() @@ -702,7 +702,7 @@ class TestConfig(TestCase): """ With multiple config files (systemwide and users), we want compounding. - dict update shoudl be in the right order. + dict update should be in the right order. """ c1 = Config() c2 = Config() @@ -720,7 +720,7 @@ class TestConfig(TestCase): """ With multiple config files (systemwide and users), we want compounding. - Later dict overwrite lazyness + Later dict overwrite laziness """ c1 = Config() c2 = Config() @@ -738,7 +738,7 @@ class TestConfig(TestCase): """ With multiple config files (systemwide and users), we want compounding. - Later dict overwrite lazyness + Later dict overwrite laziness """ c1 = Config() c2 = Config() diff --git a/contrib/python/traitlets/py3/tests/test_traitlets.py b/contrib/python/traitlets/py3/tests/test_traitlets.py index 62fa726f19b..07c95ca2519 100644 --- a/contrib/python/traitlets/py3/tests/test_traitlets.py +++ b/contrib/python/traitlets/py3/tests/test_traitlets.py @@ -2013,7 +2013,7 @@ class TestLink(TestCase): a = A(value=9) b = A(value=8) - # Conenct the two classes. + # Connect the two classes. c = link((a, "value"), (b, "value")) # Make sure the values are the same at the point of linking. @@ -2038,7 +2038,7 @@ class TestLink(TestCase): a = A(value=9) b = B(count=8) - # Conenct the two classes. + # Connect the two classes. c = link((a, "value"), (b, "count")) # Make sure the values are the same at the point of linking. @@ -2126,7 +2126,7 @@ class TestLink(TestCase): a = A(value=9) b = A(value=8) - # Conenct the two classes. + # Connect the two classes. c = link((a, "value"), (b, "value"), transform=(lambda x: 2 * x, lambda x: int(x / 2.0))) # Make sure the values are correct at the point of linking. @@ -2178,7 +2178,7 @@ class TestDirectionalLink(TestCase): a = A(value=9) b = A(value=8) - # Conenct the two classes. + # Connect the two classes. c = directional_link((a, "value"), (b, "value")) # Make sure the values are the same at the point of linking. @@ -2201,7 +2201,7 @@ class TestDirectionalLink(TestCase): a = A(value=9) b = A(value=8) - # Conenct the two classes. + # Connect the two classes. c = directional_link((a, "value"), (b, "value"), lambda x: 2 * x) # Make sure the values are correct at the point of linking. @@ -2227,7 +2227,7 @@ class TestDirectionalLink(TestCase): a = A(value=9) b = B(count=8) - # Conenct the two classes. + # Connect the two classes. c = directional_link((a, "value"), (b, "count")) # Make sure the values are the same at the point of linking. |
