aboutsummaryrefslogtreecommitdiff
path: root/infra/utils_test.py
diff options
context:
space:
mode:
authorjonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com>2020-11-17 13:39:57 -0800
committerGitHub <noreply@github.com>2020-11-17 13:39:57 -0800
commitf3c0204d102b1fed8e982ee49160e8cc9292aeee (patch)
tree50be72f4008089d0b8f9cead4432cfbd5c9c4def /infra/utils_test.py
parent93214a5535976d532475f322469367816beedd7b (diff)
downloadoss-fuzz-f3c0204d102b1fed8e982ee49160e8cc9292aeee.tar.gz
[NFC][CIFuzz] Fix coding issues. (#4550)
Fix some coding and style issues. 1. Treat "testcase" as one word. This is consistent with ClusterFuzz. 2. Treat "stacktrace" as one word. This is consistent with ClusterFuzz. 3. Fix spelling of comments and words in code. 4. Use descriptive style docstrings and remove unnecessary clutter (e.g. "Test the functionality of foo_function function in bar module" becomes "Tests foo_function." 5. Use JSON for a list needed in testing instead of pickle.
Diffstat (limited to 'infra/utils_test.py')
-rw-r--r--infra/utils_test.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/infra/utils_test.py b/infra/utils_test.py
index 7b822a1b3..0fc614f86 100644
--- a/infra/utils_test.py
+++ b/infra/utils_test.py
@@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-"""Test the functionality of the utils module's functions"""
+"""Tests the functionality of the utils module's functions"""
import os
import tempfile
@@ -26,11 +26,11 @@ TEST_OUT_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)),
'cifuzz', 'test_files', 'out')
-class IsFuzzTargetLocalUnitTest(unittest.TestCase):
- """Test is_fuzz_target_local function in the utils module."""
+class IsFuzzTargetLocalTest(unittest.TestCase):
+ """Tests the is_fuzz_target_local function."""
def test_invalid_filepath(self):
- """Test the function with an invalid file path."""
+ """Tests the function with an invalid file path."""
is_local = utils.is_fuzz_target_local('not/a/real/file')
self.assertFalse(is_local)
is_local = utils.is_fuzz_target_local('')
@@ -48,8 +48,8 @@ class IsFuzzTargetLocalUnitTest(unittest.TestCase):
self.assertFalse(is_local)
-class GetFuzzTargetsUnitTest(unittest.TestCase):
- """Test get_fuzz_targets function in the utils module."""
+class GetFuzzTargetsTest(unittest.TestCase):
+ """Tests the get_fuzz_targets function."""
def test_valid_filepath(self):
"""Tests that fuzz targets can be retrieved once the fuzzers are built."""
@@ -70,8 +70,8 @@ class GetFuzzTargetsUnitTest(unittest.TestCase):
self.assertFalse(fuzz_targets)
-class ExecuteUnitTest(unittest.TestCase):
- """Test execute function in the utils module."""
+class ExecuteTest(unittest.TestCase):
+ """Tests the execute function."""
def test_valid_command(self):
"""Tests that execute can produce valid output."""