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

Unified Diff: infra/services/gnumbd/test/__main__.py

Issue 355153002: Refactor infra git libs and testing. (Closed) Base URL: https://chromium.googlesource.com/infra/infra@fake_testing_support
Patch Set: Change config ref to have a sandard naming scheme Created 6 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
Index: infra/services/gnumbd/test/__main__.py
diff --git a/infra/services/gnumbd/test/__main__.py b/infra/services/gnumbd/test/__main__.py
deleted file mode 100644
index f0dcc17c1d96128ee3ed262dc48b744eb2753258..0000000000000000000000000000000000000000
--- a/infra/services/gnumbd/test/__main__.py
+++ /dev/null
@@ -1,57 +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 glob
-import os
-import shutil
-import tempfile
-
-from infra.services import gnumbd
-
-from infra.ext import testing_support # pylint: disable=W0611
-from testing_support import expect_tests # pylint: disable=F0401
-
-GNUMBD_PATH = os.path.abspath(os.path.dirname(gnumbd.__file__))
-
-
-def GenTests(tmpdir):
- from infra.services.gnumbd.test import (
- gnumbd_smoketests_main, util_test, data_test, git_test, config_test)
-
- for test in gnumbd_smoketests_main.GenTests(tmpdir):
- yield test
-
- for test_mod in (util_test, data_test, git_test, config_test):
- for test in expect_tests.UnitTestModule(test_mod):
- yield test
-
-
-#### Actual tests
-def main():
- suffix = '.gnumbd_smoketests'
- tmpdir = tempfile.mkdtemp(suffix)
- for p in glob.glob(os.path.join(os.path.dirname(tmpdir), '*'+suffix)):
- if p != tmpdir:
- shutil.rmtree(p)
-
- try:
- expect_tests.main(
- 'gnumbd_tests',
- lambda: GenTests(tmpdir),
- [
- os.path.join(GNUMBD_PATH, '*.py'),
- os.path.join(GNUMBD_PATH, 'test', '*_test.py'),
- ], [
- os.path.join(GNUMBD_PATH, 'test', '__main__.py')
- ],
- cover_branches=True,
- )
- finally:
- try:
- shutil.rmtree(tmpdir)
- except Exception:
- pass
-
-if __name__ == '__main__':
- main()

Powered by Google App Engine
This is Rietveld 408576698