]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

[trivial] Use proper test cases on `unittest` (#2775)
authorBatuhan Taskaya <isidentical@gmail.com>
Sat, 15 Jan 2022 22:19:37 +0000 (01:19 +0300)
committerGitHub <noreply@github.com>
Sat, 15 Jan 2022 22:19:37 +0000 (14:19 -0800)
tests/test_black.py
tests/test_primer.py

index 91d10581f6f893794fa1802aeafdda72939f7a13..202fe23ddcd940e482a37aba1df64328d99303cf 100644 (file)
@@ -940,8 +940,8 @@ class BlackTestCase(BlackBaseTestCase):
                 self.assertFormatEqual("j = [1, 2, 3]", "j = [1, 2, 3,]")
 
         out_str = "".join(out_lines)
-        self.assertTrue("Expected tree:" in out_str)
-        self.assertTrue("Actual tree:" in out_str)
+        self.assertIn("Expected tree:", out_str)
+        self.assertIn("Actual tree:", out_str)
         self.assertEqual("".join(err_lines), "")
 
     @event_loop()
index 9bb401574ca1c2bb296170f7b9dce84dca9ca4dd..0a9d2aec495042229c7e93ea011d361ba7f48302 100644 (file)
@@ -181,7 +181,7 @@ class PrimerLibTests(unittest.TestCase):
         stdout, stderr = loop.run_until_complete(
             lib._gen_check_output([lib.BLACK_BINARY, "--help"])
         )
-        self.assertTrue("The uncompromising code formatter" in stdout.decode("utf8"))
+        self.assertIn("The uncompromising code formatter", stdout.decode("utf8"))
         self.assertEqual(None, stderr)
 
         # TODO: Add a test to see failure works on Windows