Skip to content

Commit 0f01998

Browse files
committed
Correct line lengths for style and fix typo in comment
1 parent 3f6e530 commit 0f01998

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

Lib/test/test_uuid.py

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,26 +1223,30 @@ def test_cli_uuid3_ouputted_with_valid_namespace_and_name(self):
12231223
self.assertEqual(output, str(uuid_output))
12241224
self.assertEqual(uuid_output.version, 3)
12251225

1226-
@mock.patch.object(sys, "argv", ["", "-u", "uuid3", "-n", "any UUID", "-N", "python.org"])
1226+
@mock.patch.object(sys, "argv",
1227+
["", "-u", "uuid3", "-n", "any UUID", "-N", "python.org"])
12271228
@mock.patch('sys.stderr', new_callable=io.StringIO)
12281229
def test_cli_uuid3_with_invalid_namespace(self, mock_err):
12291230
with self.assertRaises(SystemExit) as cm:
12301231
self.uuid.main()
12311232
# Check that exception code is the same as argparse.ArgumentParser.error
12321233
self.assertEqual(cm.exception.code, 2)
1233-
self.assertIn("error: badly formed hexadecimal UUID string", mock_err.getvalue())
1234+
self.assertIn("error: badly formed hexadecimal UUID string",
1235+
mock_err.getvalue())
12341236

12351237
@mock.patch.object(sys, "argv",
1236-
["", "-u", "uuid3", "-n", "0d6a16cc-34a7-47d8-b660-214d0ae184d2", "-N", "some.user"])
1237-
def test_cli_uuid3_ouputted_with_user_provided_namespace_and_name(self):
1238+
["", "-u", "uuid3", "-n",
1239+
"0d6a16cc-34a7-47d8-b660-214d0ae184d2",
1240+
"-N", "some.user"])
1241+
def test_cli_uuid3_ouputted_with_custom_namespace_and_name(self):
12381242
stdout = io.StringIO()
12391243
with contextlib.redirect_stdout(stdout):
12401244
self.uuid.main()
12411245

12421246
output = stdout.getvalue().strip()
12431247
uuid_output = self.uuid.UUID(output)
12441248

1245-
# Output should be in the form of uuid5
1249+
# Output should be in the form of uuid3
12461250
self.assertEqual(output, str(uuid_output))
12471251
self.assertEqual(uuid_output.version, 3)
12481252

@@ -1260,18 +1264,22 @@ def test_cli_uuid5_ouputted_with_valid_namespace_and_name(self):
12601264
self.assertEqual(output, str(uuid_output))
12611265
self.assertEqual(uuid_output.version, 5)
12621266

1263-
@mock.patch.object(sys, "argv", ["", "-u", "uuid5", "-n", "any UUID", "-N", "python.org"])
1267+
@mock.patch.object(sys, "argv",
1268+
["", "-u", "uuid5", "-n", "any UUID", "-N", "python.org"])
12641269
@mock.patch('sys.stderr', new_callable=io.StringIO)
12651270
def test_cli_uuid5_with_invalid_namespace(self, mock_err):
12661271
with self.assertRaises(SystemExit) as cm:
12671272
self.uuid.main()
12681273
# Check that exception code is the same as argparse.ArgumentParser.error
12691274
self.assertEqual(cm.exception.code, 2)
1270-
self.assertIn("error: badly formed hexadecimal UUID string", mock_err.getvalue())
1275+
self.assertIn("error: badly formed hexadecimal UUID string",
1276+
mock_err.getvalue())
12711277

12721278
@mock.patch.object(sys, "argv",
1273-
["", "-u", "uuid5", "-n", "0d6a16cc-34a7-47d8-b660-214d0ae184d2", "-N", "some.user"])
1274-
def test_cli_uuid5_ouputted_with_user_provided_namespace_and_name(self):
1279+
["", "-u", "uuid5", "-n",
1280+
"0d6a16cc-34a7-47d8-b660-214d0ae184d2",
1281+
"-N", "some.user"])
1282+
def test_cli_uuid5_ouputted_with_custom_namespace_and_name(self):
12751283
stdout = io.StringIO()
12761284
with contextlib.redirect_stdout(stdout):
12771285
self.uuid.main()

0 commit comments

Comments
 (0)