Skip to content

test: Added more unit tests for CLI options #1421

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

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from

Conversation

safe049
Copy link

@safe049 safe049 commented Feb 2, 2025

Added more unit test for CLI options

Added unit test for Oracle, PostgreSQL, SQLserver, DB2's connection

@helensilva14
Copy link
Collaborator

/gcbrun

@helensilva14 helensilva14 linked an issue Feb 3, 2025 that may be closed by this pull request
Copy link
Collaborator

@helensilva14 helensilva14 left a comment

Choose a reason for hiding this comment

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

Thanks a lot for your contribution @safe049! I did an overall review since I'm not very acquainted with the CLI unit tests, hopefully @nj1973 or @sundar-mudupalli-work could review them in more technical detail.

But seeing how early our Cloud Build check failed, you probably still need to lint & format your files and you can use our script ./tests/local_check.sh for that. Let me know if you need help!

@safe049
Copy link
Author

safe049 commented Feb 4, 2025

I removed those buggy function and a useless import, I think it will be alright now

@helensilva14
Copy link
Collaborator

/gcbrun

@helensilva14 helensilva14 dismissed their stale review February 4, 2025 17:22

I don't have enough context to evaluate the specific CLI unit tests, I'll be assigning to other team member

@helensilva14
Copy link
Collaborator

/gcbrun

@helensilva14 helensilva14 changed the title test: Added more unit test for some CLI options and some database connections test: Added more unit tests for CLI options Feb 12, 2025
@safe049
Copy link
Author

safe049 commented Feb 21, 2025

any progress?

@helensilva14
Copy link
Collaborator

/gcbrun

@helensilva14
Copy link
Collaborator

@nj1973 @sundar-mudupalli-work - Could you please take some time when you can to review this PR? Thank you!

@sundar-mudupalli-work
Copy link
Collaborator

/gemini review

@sundar-mudupalli-work
Copy link
Collaborator

Dear Dysprosium,
Thank you so much for your contribution! We really appreciate you taking the time to submit this pull request. We've taken a look, and while we're excited about your effort, we've identified a few areas we'd like to address. Specifically, we've reviewed the changes to test__main.py and test_cli_tools.py. We think the direction you've taken is good, but we've noticed some errors and deviations from our standard testing patterns. We'd like to work with you to refine these changes to ensure they align with our project's conventions and maintain code quality. In test__main.py, you have defined or touched 5 test functions - namely test_successful_schema_validation_with_mocked_run_validation, test_successful_query_with_mocked_get_data_client, test_successful_find_tables_with_mocked_find_tables_using_string_matching, test_successful_connection_describe_with_mocked_get_data_client, test_config_runner_with_kube_completions. You have defined 15 functions in test_cli_tools.py. I will provide a review of these below:

  1. We don't have a function to test schema validation, so the function test_successful_schema_validation_with_mocked_run_validation is a good addition. Thank you. Please follow the same pattern as test_successful_column_validation_with_mocked_run_validation, which uses only 3 arguments. Use of additional arguments is confusing, not sure why they are needed.
  2. Our current function test_successful_query_with_mocked_get_data_client has a confusing typo - calling get_data_client as mock_run. Your change is an improvement. Thank you.
  3. The function test_successful_find_tables_with_mocked_find_tables_using_string_matching appears to be a copy of the function test_successful_find_tables_with_mock. We should not repeat a test in the test suite.
  4. The functions test_successful_connection_describe_with_mocked_get_data_client and test_config_runner_with_kube_completions appear to be copies of test_successful_connection_describe_with_mocked_describe_connection and test_config_runner_1. These tests are not needed.
  5. The 15 functions defined in test_cli_tools.py do not test any dvt code. For example the function
def test_get_parsed_args_source_conn(mock_args):
    """Test arg parser values with validate command and source_conn option."""
    mock_args.return_value = argparse.Namespace(
        source_conn='{"source_type":"NewSource"}'
    )
    args = get_parsed_args()
    assert args.source_conn == '{"source_type":"NewSource"}'

mocks get_parsed_args and returns the value for source_conn specified. The assertion checks that the value passed in is what was received. No DVT code is tested by this function and these tests are not needed.

Once the above mentioned changes are made, we can integrate your code in the test suite. We understand that reviewing feedback can be a process, and we're here to help you through it. Please don't hesitate to ask any questions you may have.
Again, thank you for your contribution.

Sundar Mudupalli

@pull-request-size pull-request-size bot removed the size/L label Mar 8, 2025
@safe049
Copy link
Author

safe049 commented Mar 8, 2025

I have deleted all those useless crap functions and fixed the type and the test_successful_schema_validation_with_mocked_run_validation,but for some how my coverage test is getting these error,i don't think they're problems of the code,i should got a version issue

ERROR: Coverage failure: total of 6 is less than fail-under=70
/home/dynamo/miniconda3/envs/google/lib/python3.12/site-packages/pytest_cov/plugin.py:355: CovFailUnderWarning: Coverage failure: total of 6 is less than fail-under=70
  warnings.warn(CovFailUnderWarning(message), stacklevel=1)

================================================================================================== ERRORS ==================================================================================================
________________________________________________________________________ ERROR collecting tests/unit/ibis_addon/test_operations.py _________________________________________________________________________
../../miniconda3/envs/google/lib/python3.12/site-packages/toolz/functoolz.py:457: in memof
    return cache[k]
E   KeyError: (('Optional[str]', 'ibis.examples'), None)

During handling of the above exception, another exception occurred:
tests/unit/ibis_addon/test_operations.py:14: in <module>
    import ibis
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/__init__.py:6: in <module>
    from ibis import examples, util
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/examples/__init__.py:35: in <module>
    class Example(Concrete):
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/common/grounds.py:54: in __new__
    typehint = evaluate_typehint(typehint, module)
../../miniconda3/envs/google/lib/python3.12/site-packages/toolz/functoolz.py:461: in memof
    cache[k] = result = func(*args, **kwargs)
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/common/typing.py:30: in evaluate_typehint
    return hint._evaluate(globalns, locals(), frozenset())
E   TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
________________________________________________________________________________ ERROR collecting tests/unit/test__main.py _________________________________________________________________________________
../../miniconda3/envs/google/lib/python3.12/site-packages/toolz/functoolz.py:457: in memof
    return cache[k]
E   KeyError: (('Optional[str]', 'ibis.examples'), None)

During handling of the above exception, another exception occurred:
tests/unit/test__main.py:21: in <module>
    from data_validation import cli_tools, exceptions, config_manager, consts
data_validation/cli_tools.py:58: in <module>
    from data_validation import (
data_validation/clients.py:25: in <module>
    import ibis
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/__init__.py:6: in <module>
    from ibis import examples, util
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/examples/__init__.py:35: in <module>
    class Example(Concrete):
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/common/grounds.py:54: in __new__
    typehint = evaluate_typehint(typehint, module)
../../miniconda3/envs/google/lib/python3.12/site-packages/toolz/functoolz.py:461: in memof
    cache[k] = result = func(*args, **kwargs)
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/common/typing.py:30: in evaluate_typehint
    return hint._evaluate(globalns, locals(), frozenset())
E   TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
______________________________________________________________________________ ERROR collecting tests/unit/test_cli_tools.py _______________________________________________________________________________
../../miniconda3/envs/google/lib/python3.12/site-packages/toolz/functoolz.py:457: in memof
    return cache[k]
E   KeyError: (('Optional[str]', 'ibis.examples'), None)

During handling of the above exception, another exception occurred:
tests/unit/test_cli_tools.py:24: in <module>
    from data_validation import cli_tools, consts, gcs_helper
data_validation/cli_tools.py:58: in <module>
    from data_validation import (
data_validation/clients.py:25: in <module>
    import ibis
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/__init__.py:6: in <module>
    from ibis import examples, util
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/examples/__init__.py:35: in <module>
    class Example(Concrete):
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/common/grounds.py:54: in __new__
    typehint = evaluate_typehint(typehint, module)
../../miniconda3/envs/google/lib/python3.12/site-packages/toolz/functoolz.py:461: in memof
    cache[k] = result = func(*args, **kwargs)
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/common/typing.py:30: in evaluate_typehint
    return hint._evaluate(globalns, locals(), frozenset())
E   TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
_______________________________________________________________________________ ERROR collecting tests/unit/test_clients.py ________________________________________________________________________________
../../miniconda3/envs/google/lib/python3.12/site-packages/toolz/functoolz.py:457: in memof
    return cache[k]
E   KeyError: (('Optional[str]', 'ibis.examples'), None)

During handling of the above exception, another exception occurred:
tests/unit/test_clients.py:20: in <module>
    import ibis.backends.pandas
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/__init__.py:6: in <module>
    from ibis import examples, util
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/examples/__init__.py:35: in <module>
    class Example(Concrete):
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/common/grounds.py:54: in __new__
    typehint = evaluate_typehint(typehint, module)
../../miniconda3/envs/google/lib/python3.12/site-packages/toolz/functoolz.py:461: in memof
    cache[k] = result = func(*args, **kwargs)
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/common/typing.py:30: in evaluate_typehint
    return hint._evaluate(globalns, locals(), frozenset())
E   TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
_______________________________________________________________________________ ERROR collecting tests/unit/test_combiner.py _______________________________________________________________________________
../../miniconda3/envs/google/lib/python3.12/site-packages/toolz/functoolz.py:457: in memof
    return cache[k]
E   KeyError: (('Optional[str]', 'ibis.examples'), None)

During handling of the above exception, another exception occurred:
tests/unit/test_combiner.py:16: in <module>
    import ibis.backends.pandas
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/__init__.py:6: in <module>
    from ibis import examples, util
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/examples/__init__.py:35: in <module>
    class Example(Concrete):
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/common/grounds.py:54: in __new__
    typehint = evaluate_typehint(typehint, module)
../../miniconda3/envs/google/lib/python3.12/site-packages/toolz/functoolz.py:461: in memof
    cache[k] = result = func(*args, **kwargs)
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/common/typing.py:30: in evaluate_typehint
    return hint._evaluate(globalns, locals(), frozenset())
E   TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
____________________________________________________________________________ ERROR collecting tests/unit/test_config_manager.py ____________________________________________________________________________
../../miniconda3/envs/google/lib/python3.12/site-packages/toolz/functoolz.py:457: in memof
    return cache[k]
E   KeyError: (('Optional[str]', 'ibis.examples'), None)

During handling of the above exception, another exception occurred:
tests/unit/test_config_manager.py:18: in <module>
    import ibis.expr.datatypes as dt
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/__init__.py:6: in <module>
    from ibis import examples, util
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/examples/__init__.py:35: in <module>
    class Example(Concrete):
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/common/grounds.py:54: in __new__
    typehint = evaluate_typehint(typehint, module)
../../miniconda3/envs/google/lib/python3.12/site-packages/toolz/functoolz.py:461: in memof
    cache[k] = result = func(*args, **kwargs)
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/common/typing.py:30: in evaluate_typehint
    return hint._evaluate(globalns, locals(), frozenset())
E   TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
___________________________________________________________________________ ERROR collecting tests/unit/test_data_validation.py ____________________________________________________________________________
../../miniconda3/envs/google/lib/python3.12/site-packages/toolz/functoolz.py:457: in memof
    return cache[k]
E   KeyError: (('Optional[str]', 'ibis.examples'), None)

During handling of the above exception, another exception occurred:
tests/unit/test_data_validation.py:24: in <module>
    import ibis.expr.datatypes as dt
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/__init__.py:6: in <module>
    from ibis import examples, util
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/examples/__init__.py:35: in <module>
    class Example(Concrete):
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/common/grounds.py:54: in __new__
    typehint = evaluate_typehint(typehint, module)
../../miniconda3/envs/google/lib/python3.12/site-packages/toolz/functoolz.py:461: in memof
    cache[k] = result = func(*args, **kwargs)
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/common/typing.py:30: in evaluate_typehint
    return hint._evaluate(globalns, locals(), frozenset())
E   TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
__________________________________________________________________________ ERROR collecting tests/unit/test_partition_builder.py ___________________________________________________________________________
../../miniconda3/envs/google/lib/python3.12/site-packages/toolz/functoolz.py:457: in memof
    return cache[k]
E   KeyError: (('Optional[str]', 'ibis.examples'), None)

During handling of the above exception, another exception occurred:
tests/unit/test_partition_builder.py:23: in <module>
    from data_validation import cli_tools
data_validation/cli_tools.py:58: in <module>
    from data_validation import (
data_validation/clients.py:25: in <module>
    import ibis
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/__init__.py:6: in <module>
    from ibis import examples, util
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/examples/__init__.py:35: in <module>
    class Example(Concrete):
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/common/grounds.py:54: in __new__
    typehint = evaluate_typehint(typehint, module)
../../miniconda3/envs/google/lib/python3.12/site-packages/toolz/functoolz.py:461: in memof
    cache[k] = result = func(*args, **kwargs)
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/common/typing.py:30: in evaluate_typehint
    return hint._evaluate(globalns, locals(), frozenset())
E   TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
__________________________________________________________________________ ERROR collecting tests/unit/test_schema_validation.py ___________________________________________________________________________
../../miniconda3/envs/google/lib/python3.12/site-packages/toolz/functoolz.py:457: in memof
    return cache[k]
E   KeyError: (('Optional[str]', 'ibis.examples'), None)

During handling of the above exception, another exception occurred:
tests/unit/test_schema_validation.py:20: in <module>
    from data_validation import consts, data_validation
data_validation/data_validation.py:19: in <module>
    import ibis.backends.pandas
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/__init__.py:6: in <module>
    from ibis import examples, util
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/examples/__init__.py:35: in <module>
    class Example(Concrete):
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/common/grounds.py:54: in __new__
    typehint = evaluate_typehint(typehint, module)
../../miniconda3/envs/google/lib/python3.12/site-packages/toolz/functoolz.py:461: in memof
    cache[k] = result = func(*args, **kwargs)
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/common/typing.py:30: in evaluate_typehint
    return hint._evaluate(globalns, locals(), frozenset())
E   TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
__________________________________________________________________________ ERROR collecting tests/unit/test_validation_builder.py __________________________________________________________________________
../../miniconda3/envs/google/lib/python3.12/site-packages/toolz/functoolz.py:457: in memof
    return cache[k]
E   KeyError: (('Optional[str]', 'ibis.examples'), None)

During handling of the above exception, another exception occurred:
tests/unit/test_validation_builder.py:21: in <module>
    from data_validation.config_manager import ConfigManager
data_validation/config_manager.py:22: in <module>
    import ibis.expr.datatypes as dt
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/__init__.py:6: in <module>
    from ibis import examples, util
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/examples/__init__.py:35: in <module>
    class Example(Concrete):
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/common/grounds.py:54: in __new__
    typehint = evaluate_typehint(typehint, module)
../../miniconda3/envs/google/lib/python3.12/site-packages/toolz/functoolz.py:461: in memof
    cache[k] = result = func(*args, **kwargs)
../../miniconda3/envs/google/lib/python3.12/site-packages/ibis/common/typing.py:30: in evaluate_typehint
    return hint._evaluate(globalns, locals(), frozenset())
E   TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
============================================================================================= warnings summary =============================================================================================
data_validation/__init__.py:15
  /home/dynamo/projects/professional-services-data-validator/data_validation/__init__.py:15: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    from pkg_resources import get_distribution

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

---------- coverage: platform linux, python 3.12.9-final-0 -----------
Name                                                     Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------------------------------------------------
data_validation/__init__.py                                  3      0      0      0   100%
data_validation/__main__.py                                269    269    128      0     0%   15-713
data_validation/app.py                                      40     40      8      0     0%   15-76
data_validation/cli_tools.py                               489    477    134      0     2%   66-1612
data_validation/client_info.py                               6      1      0      0    83%   25
data_validation/clients.py                                 172    163     52      0     4%   26-371
data_validation/combiner.py                                123    123     38      0     0%   21-502
data_validation/config_manager.py                          549    542    182      0     1%   23-1303
data_validation/consts.py                                  122      0      0      0   100%
data_validation/data_validation.py                         142    137     48      0     3%   20-413
data_validation/exceptions.py                                6      6      0      0     0%   16-25
data_validation/find_tables.py                              42     42     12      0     0%   16-157
data_validation/gcs_helper.py                               63     45     16      0    23%   28, 33-35, 40-46, 54, 58-62, 66-68, 73-75, 79-83, 87-95, 100-109, 113-119
data_validation/jellyfish_distance.py                       10     10      4      0     0%   15-35
data_validation/metadata.py                                 36     36      8      0     0%   17-71
data_validation/partition_builder.py                       132    132     42      0     0%   15-430
data_validation/query_builder/__init__.py                    0      0      0      0   100%
data_validation/query_builder/partition_row_builder.py      16     16      2      0     0%   15-71
data_validation/query_builder/query_builder.py             242    242     52      0     0%   15-607
data_validation/query_builder/random_row_builder.py         28     28      4      0     0%   14-104
data_validation/raw_query.py                                31     31     12      0     0%   15-74
data_validation/result_handlers/__init__.py                  0      0      0      0   100%
data_validation/result_handlers/bigquery.py                 32     32     12      0     0%   17-124
data_validation/result_handlers/text.py                     32     32     12      0     0%   24-87
data_validation/schema_validation.py                       167    167     66      0     0%   15-400
data_validation/secret_manager.py                           18     18      2      0     0%   15-62
data_validation/state_manager.py                            59     37     14      0    30%   43-51, 60-61, 69-70, 80-83, 93-97, 101-102, 110-113, 121, 126-129, 132-135, 138-142, 145-148
data_validation/util.py                                     26     26      6      0     0%   15-62
data_validation/validation_builder.py                      188    188     34      0     0%   14-427
tests/unit/__init__.py                                       0      0      0      0   100%
tests/unit/ibis_addon/__init__.py                            0      0      0      0   100%
tests/unit/ibis_addon/test_operations.py                    25     24      0      0     4%   15-83
tests/unit/query_builder/__init__.py                         0      0      0      0   100%
tests/unit/query_builder/test_random_row_builder.py         12      7      0      0    42%   20-22, 26, 30-34
tests/unit/result_handlers/__init__.py                       0      0      0      0   100%
tests/unit/result_handlers/test_bigquery.py                 14      8      0      0    43%   23-25, 29-36
tests/unit/result_handlers/test_text.py                     52     35      2      0    31%   53-55, 60, 65-72, 77-84, 89-97, 102-121, 136-147
tests/unit/test__main.py                                   159    153      0      0     4%   22-607
tests/unit/test_cli_tools.py                               303    295      4      0     3%   26-990
tests/unit/test_clients.py                                  42     37      0      0    12%   21-95
tests/unit/test_combiner.py                                 64     62      0      0     3%   17-1103
tests/unit/test_config_manager.py                          226    222      2      0     2%   20-667
tests/unit/test_data_validation.py                         301    292      4      0     3%   26-892
tests/unit/test_find_tables.py                              21      7      0      0    67%   54-56, 61-65, 153-160
tests/unit/test_metadata.py                                 23     14      0      0    39%   20-22, 37-41, 45-49, 89-103, 107-111
tests/unit/test_partition_builder.py                       117    109      6      0     7%   24-713
tests/unit/test_raw_query.py                                32     17      0      0    47%   26-28, 51-54, 69-71, 91-93, 118-119, 136-140
tests/unit/test_schema_validation.py                        93     88      8      0     5%   21-513
tests/unit/test_state_manager.py                            31     24      0      0    23%   26-41, 46-61, 68-77
tests/unit/test_util.py                                     37     26      2      0    28%   21-23, 28-36, 41-49, 54-62, 141-145, 159-160
tests/unit/test_validation_builder.py                       68     63      0      0     7%   24-349
----------------------------------------------------------------------------------------------------
TOTAL                                                     4663   4323    916      0     6%

FAIL Required test coverage of 70.0% not reached. Total coverage: 6.09%
========================================================================================= short test summary info ==========================================================================================
ERROR tests/unit/ibis_addon/test_operations.py - TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
ERROR tests/unit/test__main.py - TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
ERROR tests/unit/test_cli_tools.py - TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
ERROR tests/unit/test_clients.py - TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
ERROR tests/unit/test_combiner.py - TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
ERROR tests/unit/test_config_manager.py - TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
ERROR tests/unit/test_data_validation.py - TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
ERROR tests/unit/test_partition_builder.py - TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
ERROR tests/unit/test_schema_validation.py - TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
ERROR tests/unit/test_validation_builder.py - TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 10 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1 warning, 10 errors in 4.31s
Finish TEST COVERAGE
Start CODE STYLE (FLAKE8)
tests/unit/test_cli_tools.py:990:45: W292 no newline at end of file
Finish CODE STYLE (FLAKE8)
Start CODE FORMATTING (BLACK)
reformatted tests/unit/test_cli_tools.py

All done! ✨ 🍰 ✨
1 file reformatted, 132 files left unchanged.
Finish CODE FORMATTING (BLACK)

@helensilva14
Copy link
Collaborator

/gcbrun

@helensilva14
Copy link
Collaborator

Hi @sundar-mudupalli-work, the latest build failed after 11m, could you please check what happened and take a look at the recent changes and comment added by @safe049? Thanks!

@sundar-mudupalli-work
Copy link
Collaborator

Hi,

Sorry for the delay. Thank you for pursuing this and let me know what I can do to take this effort to completion.

There is a lint failure with the current tests as follows:

nox > flake8 tests
tests/unit/test_cli_tools.py:990:45: W292 no newline at end of file
nox > Command flake8 tests failed with exit code 1
nox > Session lint failed.

Please run flake8 and black before submitting any code. I am not sure how much Helen has briefed you on the different steps we have before merging the changes into develop. I tried editing this file - however the only option it would give me was to update develop - since the branch it is coming from (your repo) is a place where I may not have permission to update.

Sundar Mudupalli

@safe049
Copy link
Author

safe049 commented Mar 21, 2025

I will do black

BTW,I have invited you into my branch so that you can access my fork
@sundar-mudupalli-work

@sundar-mudupalli-work
Copy link
Collaborator

/gcbrun

@nj1973
Copy link
Contributor

nj1973 commented Mar 27, 2025

Hi @safe049 , a quick question on the new test test_successful_schema_validation_with_mocked_run_validation.

The test has 5 mock.patch decorators but only 3 positional arguments. Can you check what you meant please? It also looks like you have patched data_validation.__main__.build_config_managers_from_args twice, is that correct?

Thanks

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

Successfully merging this pull request may close these issues.

CLI Unit tests could cover more (all?) CLI options

None yet

4 participants