question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing unit tests for some modules in providers package

See original GitHub issue

Description

We have a rule that every file in the providers directory should have tests. This is true in many cases, but there are minor exceptions. https://github.com/apache/airflow/blob/master/tests/test_project_structure.py#L29-L50

  • tests/providers/amazon/aws/hooks/test_athena.py
  • tests/providers/apache/cassandra/sensors/test_record.py
  • tests/providers/apache/cassandra/sensors/test_table.py
  • tests/providers/apache/hdfs/sensors/test_web_hdfs.py
  • tests/providers/apache/hive/operators/test_vertica_to_hive.py
  • tests/providers/apache/pig/operators/test_pig.py
  • tests/providers/apache/spark/hooks/test_spark_jdbc_script.py
  • tests/providers/cncf/kubernetes/operators/test_kubernetes_pod.py
  • tests/providers/google/cloud/operators/test_datastore.py
  • tests/providers/google/cloud/operators/test_sql_to_gcs.py
  • tests/providers/google/cloud/sensors/test_bigquery.py
  • tests/providers/google/cloud/utils/test_field_sanitizer.py
  • tests/providers/google/cloud/utils/test_field_validator.py
  • tests/providers/google/cloud/utils/test_mlengine_operator_utils.py
  • tests/providers/google/cloud/utils/test_mlengine_prediction_summary.py
  • tests/providers/jenkins/hooks/test_jenkins.py
  • tests/providers/microsoft/azure/sensors/test_azure_cosmos.py
  • tests/providers/microsoft/mssql/hooks/test_mssql.py
  • tests/providers/oracle/operators/test_oracle.py
  • tests/providers/qubole/hooks/test_qubole.py
  • tests/providers/samba/hooks/test_samba.py
  • tests/providers/sqlite/operators/test_sqlite.py
  • tests/providers/yandex/hooks/test_yandex.py

I would be happy if someone would complete the missing tests.

If you decide to finish this ticket you don’t have to do all the work yourself. One PR can only deal with a single file and it’s ok.

Are you wondering how to start contributing to this project? Start by reading our contributor guide

Use case / motivation

Raising test coverage facilitates refactoring and prevents regression.

For the contributor, this is an opportunity to learn more about the structure of the project and to learn better good practices in writing tests in Python.

Related Issues

N/A

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:19 (18 by maintainers)

github_iconTop GitHub Comments

2reactions
samuelkhtucommented, Jun 11, 2020

If no one is working on the test_mssql.py, I can take work it.

tests/providers/microsoft/mssql/hooks/test_mssql.py

1reaction
mik-lajcommented, Jul 18, 2020

@rootcss Wouldn’t you be willing to give some love for this ticket? https://github.com/apache/airflow/issues/8189

Read more comments on GitHub >

github_iconTop Results From Across the Web

Component unit test complains about missing provider for ...
Hi, I am fairly new to Angular 2 and ng2-redux so I want to apologize upfront if I just oversaw a small thing....
Read more >
Painful unit test arrangement In Angular / Jasmine
It is being really painful to configure testing module for my unit tests in Angular. The problem is that I don't have an...
Read more >
Testing services - Angular
Here are some synchronous and asynchronous unit tests of the ValueService written ... The TestBed creates a dynamically-constructed Angular test module that ...
Read more >
Testing and faking Angular dependencies - DEV Community ‍ ‍
Tree-shakable dependencies remove the layer of indirection that is Angular modules, but how do we test their tree-shakable providers?
Read more >
Unit testing NestJS applications with Jest - LogRocket Blog
The package enables us to create a Nest module, like we normally would, by declaring only the dependencies used in the tests. Here's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found