Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Unified Diff: client/tests/subprocess42_test.py

Issue 2037253002: run_isolated.py: install CIPD packages (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@master
Patch Set: fix client fetching Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/tests/run_isolated_test.py ('k') | client/tests/swarming_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/tests/subprocess42_test.py
diff --git a/client/tests/subprocess42_test.py b/client/tests/subprocess42_test.py
index 2b49bed88487a9637eb682fabd61173b91d7f109..6cca5de9df6f3c00128bcd5ee79ca8152be1e855 100755
--- a/client/tests/subprocess42_test.py
+++ b/client/tests/subprocess42_test.py
@@ -665,6 +665,36 @@ class Subprocess42Test(unittest.TestCase):
proc.kill()
proc.wait()
+ def test_split(self):
+ data = [
+ ('stdout', 'o1\no2\no3\n'),
+ ('stderr', 'e1\ne2\ne3\n'),
+ ('stdout', '\n\n'),
+ ('stdout', '\n'),
+ ('stdout', 'o4\no5'),
+ ('stdout', '_sameline\npart1 of one line '),
+ ('stderr', 'err inserted between two parts of stdout\n'),
+ ('stdout', 'part2 of one line\n'),
+ ('stdout', 'incomplete last stdout'),
+ ('stderr', 'incomplete last stderr'),
+ ]
+ self.assertEquals(list(subprocess42.split(data)), [
+ ('stdout', 'o1'),
+ ('stdout', 'o2'),
+ ('stdout', 'o3'),
+ ('stderr', 'e1'),
+ ('stderr', 'e2'),
+ ('stderr', 'e3'),
+ ('stdout', ''),
+ ('stdout', ''),
+ ('stdout', ''),
+ ('stdout', 'o4'),
+ ('stdout', 'o5_sameline'),
+ ('stderr', 'err inserted between two parts of stdout'),
+ ('stdout', 'part1 of one line part2 of one line'),
+ ('stderr', 'incomplete last stderr'),
+ ('stdout', 'incomplete last stdout'),
+ ])
if __name__ == '__main__':
if '-v' in sys.argv:
« no previous file with comments | « client/tests/run_isolated_test.py ('k') | client/tests/swarming_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698