From 33c2407bc3b552ded0ff5268098d488f8ad50c92 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Tue, 11 Feb 2020 17:15:54 -0500 Subject: [PATCH] tests: move system tests into a package Prep for factoring out e.g. signing tests into separate modules. Port of https://github.com/googleapis/google-cloud-python/pull/9777 into new reposiory. --- tests/{system.py => system/test_system.py} | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) rename tests/{system.py => system/test_system.py} (99%) diff --git a/tests/system.py b/tests/system/test_system.py similarity index 99% rename from tests/system.py rename to tests/system/test_system.py index 995b984ed..712299498 100644 --- a/tests/system.py +++ b/tests/system/test_system.py @@ -40,6 +40,8 @@ USER_PROJECT = os.environ.get("GOOGLE_CLOUD_TESTS_USER_PROJECT") +DIRNAME = os.path.realpath(os.path.dirname(__file__)) +DATA_DIRNAME = os.path.abspath(os.path.join(DIRNAME, "..", "data")) def _bad_copy(bad_request): @@ -451,11 +453,10 @@ def test_bucket_get_blob_with_user_project(self): class TestStorageFiles(unittest.TestCase): - DIRNAME = os.path.realpath(os.path.dirname(__file__)) FILES = { - "logo": {"path": DIRNAME + "/data/CloudPlatform_128px_Retina.png"}, - "big": {"path": DIRNAME + "/data/five-point-one-mb-file.zip"}, - "simple": {"path": DIRNAME + "/data/simple.txt"}, + "logo": {"path": DATA_DIRNAME + "/CloudPlatform_128px_Retina.png"}, + "big": {"path": DATA_DIRNAME + "/five-point-one-mb-file.zip"}, + "simple": {"path": DATA_DIRNAME + "/simple.txt"}, } @classmethod