codezonediitj / pydatastructs

A python package for data structures and algorithms
https://pydatastructs.readthedocs.io/en/stable/
Other
199 stars 270 forks source link

Add test function #535

Closed sak-codes closed 1 year ago

sak-codes commented 1 year ago

References to other Issues or PRs or Relevant literature

Fixes #436

Brief description of what is fixed or changed

Other comments

codecov[bot] commented 1 year ago

Codecov Report

Merging #535 (3f0a291) into main (119653a) will decrease coverage by 1.009%. The diff coverage is 25.423%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #535 +/- ## ============================================= - Coverage 98.602% 97.594% -1.009% ============================================= Files 33 34 +1 Lines 4222 4281 +59 ============================================= + Hits 4163 4178 +15 - Misses 59 103 +44 ``` | [Impacted Files](https://app.codecov.io/gh/codezonediitj/pydatastructs/pull/535?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codezonediitj) | Coverage Δ | | |---|---|---| | [pydatastructs/utils/testing\_util.py](https://app.codecov.io/gh/codezonediitj/pydatastructs/pull/535?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codezonediitj#diff-cHlkYXRhc3RydWN0cy91dGlscy90ZXN0aW5nX3V0aWwucHk=) | `18.518% <18.518%> (ø)` | | | [pydatastructs/graphs/\_\_init\_\_.py](https://app.codecov.io/gh/codezonediitj/pydatastructs/pull/535?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codezonediitj#diff-cHlkYXRhc3RydWN0cy9ncmFwaHMvX19pbml0X18ucHk=) | `100.000% <100.000%> (ø)` | | | [pydatastructs/utils/\_\_init\_\_.py](https://app.codecov.io/gh/codezonediitj/pydatastructs/pull/535?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codezonediitj#diff-cHlkYXRhc3RydWN0cy91dGlscy9fX2luaXRfXy5weQ==) | `100.000% <100.000%> (ø)` | | [![Impacted file tree graph](https://app.codecov.io/gh/codezonediitj/pydatastructs/pull/535/graphs/tree.svg?width=650&height=150&src=pr&token=mZMqq5ubAu&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codezonediitj)](https://app.codecov.io/gh/codezonediitj/pydatastructs/pull/535?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codezonediitj)
Smit-create commented 1 year ago

I tested the PR, and it works fine for me locally, but seems that CI doesn't show a failure when the tests are failing:

!!!!!!!!!!!!!!!!!!! Interrupted: 22 errors during collection !!!!!!!!!!!!!!!!!!!
============================== 22 errors in 0.59s ==============================

The errors reflect that there are many test files with the same base name so might be a reason for that failure. Can you test the same @czgdp1807 if you could produce this error locally?

sak-codes commented 1 year ago

I have tried to complete all the 3 features. Please see the output of last point:

>>> import pydatastructs as pyds
>>> from pydatastructs import linear_data_structures as lds
>>> pyds.test(lds)
============================= test session starts ==============================
platform darwin -- Python 3.8.16, pytest-7.3.1, pluggy-1.0.0
rootdir: /Users/thebigbool/repos/pydatastructs
plugins: cov-4.1.0, xdist-3.3.1, anyio-3.7.0
collected 31 items                                                             

pydatastructs/linear_data_structures/tests/test_arrays.py ...            [  9%]
pydatastructs/linear_data_structures/tests/test_linked_lists.py .....    [ 25%]
pydatastructs/linear_data_structures/tests/test_algorithms.py .......... [ 58%]
.............                                                            [100%]

============================== 31 passed in 0.10s ==============================