Skip to content

Commit b9c0bca

Browse files
authored
tests: move system tests into a package (#51)
Prep for factoring out e.g. signing tests into separate modules. Port of googleapis/google-cloud-python#9777 into new reposiory.
1 parent fe434fc commit b9c0bca

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/system.py renamed to tests/system/test_system.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040

4141

4242
USER_PROJECT = os.environ.get("GOOGLE_CLOUD_TESTS_USER_PROJECT")
43+
DIRNAME = os.path.realpath(os.path.dirname(__file__))
44+
DATA_DIRNAME = os.path.abspath(os.path.join(DIRNAME, "..", "data"))
4345

4446

4547
def _bad_copy(bad_request):
@@ -451,11 +453,10 @@ def test_bucket_get_blob_with_user_project(self):
451453

452454
class TestStorageFiles(unittest.TestCase):
453455

454-
DIRNAME = os.path.realpath(os.path.dirname(__file__))
455456
FILES = {
456-
"logo": {"path": DIRNAME + "/data/CloudPlatform_128px_Retina.png"},
457-
"big": {"path": DIRNAME + "/data/five-point-one-mb-file.zip"},
458-
"simple": {"path": DIRNAME + "/data/simple.txt"},
457+
"logo": {"path": DATA_DIRNAME + "/CloudPlatform_128px_Retina.png"},
458+
"big": {"path": DATA_DIRNAME + "/five-point-one-mb-file.zip"},
459+
"simple": {"path": DATA_DIRNAME + "/simple.txt"},
459460
}
460461

461462
@classmethod

0 commit comments

Comments
 (0)