Skip to content

Comments

[AIRFLOW-6617] Add tests to PYTHONPATH in breeze#7241

Closed
turbaszek wants to merge 1 commit intoapache:masterfrom
PolideaInternal:AIRFLOW-6617-tests-pythonpath
Closed

[AIRFLOW-6617] Add tests to PYTHONPATH in breeze#7241
turbaszek wants to merge 1 commit intoapache:masterfrom
PolideaInternal:AIRFLOW-6617-tests-pythonpath

Conversation

@turbaszek
Copy link
Member

@turbaszek turbaszek commented Jan 22, 2020

Adding tests directory to PYTHONPATH helps during development :)


Issue link: AIRFLOW-6617

Make sure to mark the boxes below before creating PR: [x]

  • Description above provides context of the change
  • Commit message/PR title starts with [AIRFLOW-NNNN]. AIRFLOW-NNNN = JIRA ID*
  • Unit tests coverage for changes (not needed for documentation changes)
  • Commits follow "How to write a good git commit message"
  • Relevant documentation is updated including usage instructions.
  • I will engage committers as explained in Contribution Workflow Example.

* For document-only changes commit message can start with [AIRFLOW-XXXX].


In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.
Read the Pull Request Guidelines for more information.

@potiuk
Copy link
Member

potiuk commented Jan 22, 2020

Just wondering how it helps ? Not that I am against it but like to see a reason for it and maybe add it for others to the docs how it can be helpful

@turbaszek
Copy link
Member Author

Just wondering how it helps ? Not that I am against it but like to see a reason for it and maybe add it for others to the docs how it can be helpful

It has already happened a few times that I had to set up it manually.

@potiuk
Copy link
Member

potiuk commented Jan 23, 2020

Yeah. But I wonder when it is needed. I.e. it should not be needed, unless someone (for example) somewhere in our code imports tests not from where it should i.e. import kubernetes instead of import tests.kubernetes -> I'd rather fix those place in the code where those bad imports are used than add tests folder to PYTHONPATH to hide the problem.

@turbaszek
Copy link
Member Author

My problem was not bad imports but running python tests/some/path, mostly used here #6761 to use cli for tests.

@turbaszek turbaszek closed this Jan 25, 2020
@turbaszek turbaszek deleted the AIRFLOW-6617-tests-pythonpath branch March 14, 2020 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants