Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

System tests were deleted in #30 #47

Closed
sid-dinesh94 opened this issue Jun 4, 2020 · 2 comments · Fixed by #49
Closed

System tests were deleted in #30 #47

sid-dinesh94 opened this issue Jun 4, 2020 · 2 comments · Fixed by #49
Assignees
Labels
api: texttospeech Issues related to the googleapis/python-texttospeech API. 🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@sid-dinesh94
Copy link

The System tests as defined by the noxfile are broken and being skipped.

From one of the more recent CI runs (since #30 ), linked in ResultStore:

I see the following lines:

Running session system-3.7
Creating virtual environment (virtualenv) using python3.7 in .nox/system-3-7
Session system-3.7 skipped: System tests were not found.

and

Ran multiple sessions:
* lint: success
* blacken: success
* lint_setup_py: success
* unit-3.6: success
* unit-3.7: success
* unit-3.8: success
* system-3.7: skipped
* cover: success
* docs: success

The system tests are being skipped.

I believe this is because the decorator here:

@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS)

requires a string if it is a single python environment. This is not clearly documented in the Noxfile Docs but it might be the case.

Before #30 , the decorator was given a list of two elements, but after #30, SYSTEM_TEST_PYTHON_VERSIONS=["3.7"] . This could be changed to a string, and a comment added to point to the Noxfile docs, in case in the future, we want to test more Python versions.

@product-auto-label product-auto-label bot added the api: texttospeech Issues related to the googleapis/python-texttospeech API. label Jun 4, 2020
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Jun 5, 2020
@busunkim96
Copy link
Contributor

@sid-dinesh94 Thanks for flagging this!

@busunkim96
Copy link
Contributor

I took a closer look and it looks like this is working as intended. (This repo only has unit tests.)

"""Run the system test suite."""
system_test_path = os.path.join("tests", "system.py")
system_test_folder_path = os.path.join("tests", "system")
# Sanity check: Only run tests if the environment variable is set.
if not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS", ""):
session.skip("Credentials must be set via environment variable")
system_test_exists = os.path.exists(system_test_path)
system_test_folder_exists = os.path.exists(system_test_folder_path)
# Sanity check: only run tests if found.
if not system_test_exists and not system_test_folder_exists:
session.skip("System tests were not found")

Nox doesn't seem to have a problem with there only being one item list, since it correctly identifies and executes the code in the system session.

@busunkim96 busunkim96 reopened this Jun 9, 2020
@busunkim96 busunkim96 changed the title Noxfile system test might possibly be broken with #30 System tests were deleted in #30 Jun 9, 2020
@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Jun 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: texttospeech Issues related to the googleapis/python-texttospeech API. 🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants