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

Side by Side Diff: tools/telemetry/telemetry/core/backends/android_command_line_backend_unittest.py

Issue 811703007: Create AndroidCommandLineBackend to handle setting up cmdline args (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add context manager for command line backend Created 5 years, 11 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 unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import unittest
6
7 from telemetry.core.backends import android_command_line_backend
8
9
10 class AndroidCommandLineBackendTest(unittest.TestCase):
11
12 def testQuoteIfNeededNoEquals(self):
13 string = 'value'
14 self.assertEqual(string,
15 android_command_line_backend._QuoteIfNeeded(string))
16
17 def testQuoteIfNeededNoSpaces(self):
18 string = 'key=valueA'
19 self.assertEqual(string,
20 android_command_line_backend._QuoteIfNeeded(string))
21
22 def testQuoteIfNeededAlreadyQuoted(self):
23 string = "key='valueA valueB'"
24 self.assertEqual(string,
25 android_command_line_backend._QuoteIfNeeded(string))
26
27 def testQuoteIfNeeded(self):
28 string = 'key=valueA valueB'
29 expected_output = "key='valueA valueB'"
30 self.assertEqual(expected_output,
31 android_command_line_backend._QuoteIfNeeded(string))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698