[Piglit] [PATCH 8/8] unittests: Fix spelling mistakes

Eric Engestrom eric at engestrom.ch
Sun Apr 3 18:21:32 UTC 2016


Signed-off-by: Eric Engestrom <eric at engestrom.ch>
---
 unittests/backends_tests.py            |  2 +-
 unittests/base_tests.py                | 10 +++++-----
 unittests/core_tests.py                |  2 +-
 unittests/dmesg_tests.py               |  2 +-
 unittests/glsl_parser_test_tests.py    |  2 +-
 unittests/json_backend_tests.py        |  4 ++--
 unittests/json_results_update_tests.py |  2 +-
 unittests/log_tests.py                 |  2 +-
 unittests/options_tests.py             |  2 +-
 unittests/profile_tests.py             |  6 +++---
 unittests/results_tests.py             |  2 +-
 unittests/run_parser_tests.py          | 16 ++++++++--------
 unittests/status_tests.py              |  2 +-
 unittests/utils.py                     |  2 +-
 14 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/unittests/backends_tests.py b/unittests/backends_tests.py
index c3cda86..81466ec 100644
--- a/unittests/backends_tests.py
+++ b/unittests/backends_tests.py
@@ -88,7 +88,7 @@ def check(n, i):
 
 @nt.raises(backends.BackendError)
 def test_get_backend_unknown():
-    """backends.get_backend: An error is raised with an unkown backend."""
+    """backends.get_backend: An error is raised with an unknown backend."""
     backends.get_backend('obviously fake backend')
 
 
diff --git a/unittests/base_tests.py b/unittests/base_tests.py
index 2e64662..eea830b 100644
--- a/unittests/base_tests.py
+++ b/unittests/base_tests.py
@@ -59,7 +59,7 @@
 class TestTest(Test):
     """ A class for testing that implements a dummy interpret_result
 
-    interpret_result() can ve overwritten by setting the
+    interpret_result() can be overwritten by setting the
     self.test_interpret_result name
 
     """
@@ -118,8 +118,8 @@ def __init__(self):
         def __call__(self, *args, **kwargs):
             self.popen = subprocess.Popen(*args, **kwargs)
 
-            # if commuincate cis called successfully then the proc will be
-            # reset to None, whic will make the test fail.
+            # if communicate is called successfully then the proc will be
+            # reset to None, which will make the test fail.
             self.popen.communicate = mock.Mock(return_value=('out', 'err'))
 
             return self.popen
@@ -159,7 +159,7 @@ def p():
             test.run()
 
         # Check to see if the Popen has children, even after it should have
-        # recieved a TimeoutExpired.
+        # received a TimeoutExpired.
         proc = psutil.Process(os.getsid(proxy.popen.pid))
         children = proc.children(recursive=True)
 
@@ -423,7 +423,7 @@ def test_traceback(self):
 
         It's fragile to record the actual traceback, and it's unlikely
         that it can easily be implemented differently than the way the original
-        code is implimented, so this doesn't do that, it just verifies there is
+        code is implemented, so this doesn't do that, it just verifies there is
         a value.
 
         """
diff --git a/unittests/core_tests.py b/unittests/core_tests.py
index df7f48b..a28ebfb 100644
--- a/unittests/core_tests.py
+++ b/unittests/core_tests.py
@@ -109,7 +109,7 @@ def test_PiglitConfig_init():
 def test_parse_listfile_return():
     """core.parse_listfile(): returns a list-like object
 
-    Given a file with a newline seperated list of results, parse_listfile
+    Given a file with a newline separated list of results, parse_listfile
     should return a list of files with no whitespace
 
     """
diff --git a/unittests/dmesg_tests.py b/unittests/dmesg_tests.py
index 47c1959..b2f537c 100644
--- a/unittests/dmesg_tests.py
+++ b/unittests/dmesg_tests.py
@@ -151,7 +151,7 @@ def test_update_subtest_changed(self):
 
 
 def test_update_result_regex_no_match():
-    """dmesg.BaseDmesg.update_result: if no regex matches dont change status"""
+    """dmesg.BaseDmesg.update_result: if no regex matches don't change status"""
     dmesg_ = TestDmesg()
     dmesg_.regex = re.compile(r'nomatchforthisreally')
     result = results.TestResult('pass')
diff --git a/unittests/glsl_parser_test_tests.py b/unittests/glsl_parser_test_tests.py
index c732bec..f3c4c98 100644
--- a/unittests/glsl_parser_test_tests.py
+++ b/unittests/glsl_parser_test_tests.py
@@ -303,7 +303,7 @@ def glslparser_exetensions_seperators():
     """ GlslParserTest() can only have [A-Za-z_] as characters
 
     This test generates a number of tests that should catch the majority of
-    errors relating to seperating extensions in the config block of a
+    errors relating to separating extensions in the config block of a
     glslparser test
 
     """
diff --git a/unittests/json_backend_tests.py b/unittests/json_backend_tests.py
index eb76bfb..7d76b74 100644
--- a/unittests/json_backend_tests.py
+++ b/unittests/json_backend_tests.py
@@ -156,12 +156,12 @@ def test_update_results_old():
     """backends.json.update_results(): updates results
 
     Because of the design of the our updates (namely that they silently
-    incrementally update from x to y) it's impossible to konw exactly what
+    incrementally update from x to y) it's impossible to know exactly what
     we'll get at th end without having tests that have to be reworked each time
     updates are run. Since there already is (at least for v0 -> v1) a fairly
     comprehensive set of tests, this test only tests that update_results() has
     been set equal to the CURRENT_JSON_VERSION, (which is one of the effects of
-    runing update_results() with the assumption that there is sufficient other
+    running update_results() with the assumption that there is sufficient other
     testing of the update process.
 
     """
diff --git a/unittests/json_results_update_tests.py b/unittests/json_results_update_tests.py
index 0fcf1ec..251878a 100644
--- a/unittests/json_results_update_tests.py
+++ b/unittests/json_results_update_tests.py
@@ -200,7 +200,7 @@ def test_set_version(self):
     def test_dont_break_single_subtest(self):
         """backends.json.update_results (0 -> 1): Don't break single subtest entries
 
-        A test with a single subtest was written correctly before, dont break it by
+        A test with a single subtest was written correctly before, don't break it by
         removing the name of the test. ex:
         test/foo/bar: {
             ...
diff --git a/unittests/log_tests.py b/unittests/log_tests.py
index 8a90a21..d8d5766 100644
--- a/unittests/log_tests.py
+++ b/unittests/log_tests.py
@@ -38,7 +38,7 @@
 
 @utils.nose_generator
 def test_initialize():
-    """ Generate tests for class initializiation """
+    """ Generate tests for class initialization """
     check_initialize = lambda c, *a: c(*a)
 
     for name, class_ in [('QuiteLog', log.QuietLog),
diff --git a/unittests/options_tests.py b/unittests/options_tests.py
index 8ba13fb..8f5f7c1 100644
--- a/unittests/options_tests.py
+++ b/unittests/options_tests.py
@@ -136,7 +136,7 @@ def test_get_not_exists(self):
                 create=True)
     @nt.raises(AttributeError)
     def test_get_not_exists_fail(self):
-        """options._ReListDescriptor.__get__: Raises AttributError if name doesn't exist and cant be created"""
+        """options._ReListDescriptor.__get__: Raises AttributError if name doesn't exist and can't be created"""
         self.test.notexists  # pylint: disable=pointless-statement
 
     def test_set_relist(self):
diff --git a/unittests/profile_tests.py b/unittests/profile_tests.py
index 6abbae5..48e9d96 100644
--- a/unittests/profile_tests.py
+++ b/unittests/profile_tests.py
@@ -51,7 +51,7 @@ def test_initialize_testprofile():
 def test_load_test_profile_no_profile():
     """profile.load_test_profile: Loading a module with no profile name exits
 
-    Beacuse load_test_profile uses test.{} to load a module we need a module in
+    Because load_test_profile uses test.{} to load a module we need a module in
     tests that doesn't have a profile attribute. The only module that currently
     meets that requirement is __init__.py
 
@@ -78,7 +78,7 @@ def test_testprofile_default_dmesg():
 
 
 def test_testprofile_set_dmesg_true():
-    """profile.TestProfile: Dmesg returns an apropriate dmesg is ste to True"""
+    """profile.TestProfile: Dmesg returns an appropriate dmesg is set to True"""
     utils.platform_check('linux')
     profile_ = profile.TestProfile()
     profile_.dmesg = True
@@ -345,7 +345,7 @@ def test_testprofile_allow_reassignment_with_groupmanager():
 def test_testprofile_allow_reassignemnt_stacked():
     """profile.profile.TestDict.allow_reassignment: check stacking cornercase
 
-    There is an odd corner case in the original (obvious) implmentation of this
+    There is an odd corner case in the original (obvious) implementation of this
     function, If one opens two context managers and then returns from the inner
     one assignment will not be allowed, even though one is still inside the
     first context manager.
diff --git a/unittests/results_tests.py b/unittests/results_tests.py
index a109785..7cdb849 100644
--- a/unittests/results_tests.py
+++ b/unittests/results_tests.py
@@ -110,7 +110,7 @@ def test_TestResult_from_dict_inst():
 
 
 class TestTestResultFromDictAttributes(object):
-    """A series of tests to show that each attribute is sucessfully populated.
+    """A series of tests to show that each attribute is successfully populated.
     """
     @classmethod
     def setup_class(cls):
diff --git a/unittests/run_parser_tests.py b/unittests/run_parser_tests.py
index 44a1235..7bb7676 100644
--- a/unittests/run_parser_tests.py
+++ b/unittests/run_parser_tests.py
@@ -45,7 +45,7 @@ class TestWithEnvClean(object):
     method.
 
     Using this gives us the assurance that we're not relying on settings from
-    other tests, making ours pass or fail, and that os.enviorn is the same
+    other tests, making ours pass or fail, and that os.environ is the same
     going in as it is going out.
 
     This is modeled after Go's defer keyword.
@@ -62,14 +62,14 @@ def add_teardown(self, var, restore=True):
             del os.environ[var]
 
     def defer(self, func, *args):
-        """ Add a function (with arguments) to be run durring cleanup """
+        """ Add a function (with arguments) to be run during cleanup """
         self._teardown_calls.append((func, args))
 
     def teardown(self):
         """ Teardown the test
 
-        Restore any variables that were unset at the begining of the test, and
-        run any differed methods.
+        Restore any variables that were unset at the beginning of the test, and
+        run any deferred methods.
 
         """
         for key, value, restore in self._saved:
@@ -79,7 +79,7 @@ def teardown(self):
             elif restore:
                 os.environ[key] = value
 
-        # Teardown calls is a FIFO stack, the defered calls must be run in
+        # Teardown calls is a FIFO stack, the deferred calls must be run in
         # reversed order to make any sense
         for call, args in reversed(self._teardown_calls):
             call(*args)
@@ -88,7 +88,7 @@ def teardown(self):
 class _Helpers(TestWithEnvClean):
     """ Some helpers to be shared between tests """
     def _unset_config(self):
-        """ Ensure that no config files are being accidently loaded """
+        """ Ensure that no config files are being accidentally loaded """
         self.add_teardown('HOME')
         self.add_teardown('XDG_CONFIG_HOME')
 
@@ -158,7 +158,7 @@ def test_bad_value_in_conf(self):
         self._unset_config()
         self._move_piglit_conf()
 
-        # This has sideffects, it shouldn't effect anything in this module, but
+        # This has side effects, it shouldn't effect anything in this module, but
         # it may cause later problems. But without this we get ugly error spew
         # from this test.
         sys.stderr = open(os.devnull, 'w')
@@ -251,7 +251,7 @@ def test_bad_value_in_conf(self):
         self._unset_config()
         self._move_piglit_conf()
 
-        # This has sideffects, it shouldn't effect anything in this module, but
+        # This has side effects, it shouldn't effect anything in this module, but
         # it may cause later problems. But without this we get ugly error spew
         # from this test.
         sys.stderr = open(os.devnull, 'w')
diff --git a/unittests/status_tests.py b/unittests/status_tests.py
index 00f00e8..e431804 100644
--- a/unittests/status_tests.py
+++ b/unittests/status_tests.py
@@ -146,7 +146,7 @@ def check_not_change(new, old):
 
         This checks that new < old and old < new do not return true. This is meant
         for checking skip and notrun, which we don't want to show up as regressions
-        and fixes, but to go in their own special catagories.
+        and fixes, but to go in their own special categories.
 
         """
         nt.assert_false(new < old,
diff --git a/unittests/utils.py b/unittests/utils.py
index 178d24b..7713a94 100644
--- a/unittests/utils.py
+++ b/unittests/utils.py
@@ -315,7 +315,7 @@ def test_wrapper(*args, **kwargs):
 
 
 def binary_check(bin_, errno_=None):
-    """Check for the existance of a binary or raise SkipTest.
+    """Check for the existence of a binary or raise SkipTest.
 
     If an errno_ is provided then a skip test will be raised unless the error
     number provided is raised, or no error is raised.
-- 
2.8.0



More information about the Piglit mailing list