| 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()
|
|
|