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

Unified Diff: tools/telemetry/telemetry/internal/platform/linux_platform_backend_unittest.py

Issue 1647513002: Delete tools/telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: tools/telemetry/telemetry/internal/platform/linux_platform_backend_unittest.py
diff --git a/tools/telemetry/telemetry/internal/platform/linux_platform_backend_unittest.py b/tools/telemetry/telemetry/internal/platform/linux_platform_backend_unittest.py
deleted file mode 100644
index 052d59f9a9f71cc8b787c81447b2493e1833b955..0000000000000000000000000000000000000000
--- a/tools/telemetry/telemetry/internal/platform/linux_platform_backend_unittest.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import unittest
-
-from telemetry import decorators
-from telemetry.core import util
-from telemetry.internal.platform import linux_platform_backend
-import mock
-
-
-class LinuxPlatformBackendTest(unittest.TestCase):
- @decorators.Enabled('linux')
- def testGetOSVersionNameSaucy(self):
- path = os.path.join(util.GetUnittestDataDir(), 'ubuntu-saucy-lsb-release')
- with open(path) as f:
- unbuntu_saucy_lsb_release_content = f.read()
-
- with mock.patch.object(
- linux_platform_backend.LinuxPlatformBackend, 'GetFileContents',
- return_value=unbuntu_saucy_lsb_release_content) as mock_method:
- backend = linux_platform_backend.LinuxPlatformBackend()
- self.assertEqual(backend.GetOSVersionName(), 'saucy')
- mock_method.assert_called_once_with('/etc/lsb-release')
-
- @decorators.Enabled('linux')
- def testGetOSVersionNameArch(self):
- path = os.path.join(util.GetUnittestDataDir(), 'arch-lsb-release')
- with open(path) as f:
- arch_lsb_release_content = f.read()
-
- with mock.patch.object(
- linux_platform_backend.LinuxPlatformBackend, 'GetFileContents',
- return_value=arch_lsb_release_content) as mock_method:
- backend = linux_platform_backend.LinuxPlatformBackend()
- # a distribution may not have a codename or a release number. We just
- # check that GetOSVersionName doesn't raise an exception
- backend.GetOSVersionName()
- mock_method.assert_called_once_with('/etc/lsb-release')

Powered by Google App Engine
This is Rietveld 408576698