Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dagintegritytestdefault.py #1661

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update dagintegritytestdefault.py #1661

wants to merge 1 commit into from

Conversation

sunkickr
Copy link
Contributor

@sunkickr sunkickr commented Jun 5, 2024

Description

The new test fails when the file ".astro/dag_integrity_exceptions.txt" does not exist because we do not handle that case in the test code. This PR fixes that issue

🎟 Issue(s)

Related #XXX

🧪 Functional Testing

Tested manually

📸 Screenshots

Screenshot 2024-06-05 at 10 12 10 AM

📋 Checklist

  • Rebased from the main (or release if patching) branch (before testing)
  • Ran make test before taking out of draft
  • Ran make lint before taking out of draft
  • Added/updated applicable tests
  • Tested against Astro-API (if necessary).
  • Tested against Houston-API and Astronomer (if necessary).
  • Communicated to/tagged owners of respective clients potentially impacted by these changes.
  • Updated any related documentation

@sunkickr sunkickr marked this pull request as ready for review June 5, 2024 14:12
Copy link

codecov bot commented Jun 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.65%. Comparing base (d705171) to head (8920cfa).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1661   +/-   ##
=======================================
  Coverage   86.65%   86.65%           
=======================================
  Files         114      114           
  Lines       16712    16712           
=======================================
  Hits        14481    14481           
  Misses       1338     1338           
  Partials      893      893           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -132,6 +132,8 @@ def test_file_imports(rel_path, rv):
if os.path.exists(".astro/dag_integrity_exceptions.txt"):
with open(".astro/dag_integrity_exceptions.txt", "r") as f:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
with open(".astro/dag_integrity_exceptions.txt", "r") as f:
exceptions := []
if os.path.exists(".astro/dag_integrity_exceptions.txt"):
with open(".astro/dag_integrity_exceptions.txt", "r") as f:
exceptions = f.readlines()
print(f"Exceptions: {exceptions}")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants