AstuteSource / chasten

:dizzy: Chasten Uses XML and XPATH to Check a Python Program's AST for Specified Patterns!
https://pypi.org/project/chasten/
GNU General Public License v2.0
7 stars 8 forks source link

Convert for POSIX file paths #60

Closed Bchass closed 10 months ago

Bchass commented 11 months ago

Fix for: https://github.com/AstuteSource/chasten/issues/58

Looked for other possible conversions in unit tests.

Test results:

platform darwin -- Python 3.11.0, pytest-7.4.0, pluggy-1.2.0
Using --randomly-seed=2186093864
rootdir: /Users/chasserb/Documents/Forks/local/chasten
configfile: pytest.ini
plugins: hypothesis-6.81.1, randomly-3.13.0, dash-2.11.1, cov-4.1.0, clarity-1.0.1, anyio-3.7.1, xdist-3.3.1, pretty-1.2.0
collected 66 items                                                                                                                                  

tests/test_configuration.py ...                                                                                                               [  4%]
tests/test_util.py ...                                                                                                                        [  9%]
tests/test_filesystem.py ................                                                                                                     [ 33%]
tests/test_validate.py ....                                                                                                                   [ 39%]
tests/test_checks.py ...............                                                                                                          [ 62%]
tests/test_main.py .........                                                                                                                  [ 75%]
tests/test_constants.py .....                                                                                                                 [ 83%]
tests/test_debug.py ........                                                                                                                  [ 95%]
tests/test_process.py ...                                                                                                                     [100%]
Results (10.05s):
        66 passed
jnormile commented 11 months ago

Adding @tuduun to the review given that this will directly impact our testing strategy.

simojo commented 11 months ago

Hi @Bchass, thanks for your contribution! Some of your fixes in tests/test_main.py appear to still perform file path concatenation by [str] + [Path]. Would you be able to modify this in the following lines?

https://github.com/Bchass/chasten/blob/35fd8f6f3b760e6818107b9665e89008be13d348/tests/test_main.py#L94 https://github.com/Bchass/chasten/blob/35fd8f6f3b760e6818107b9665e89008be13d348/tests/test_main.py#L125 https://github.com/Bchass/chasten/blob/35fd8f6f3b760e6818107b9665e89008be13d348/tests/test_main.py#L147 https://github.com/Bchass/chasten/blob/35fd8f6f3b760e6818107b9665e89008be13d348/tests/test_main.py#L300

Bchass commented 11 months ago

Hi @Bchass, thanks for your contribution! Some of your fixes in tests/test_main.py appear to still perform file path concatenation by [str] + [Path]. Would you be able to modify this in the following lines?

https://github.com/Bchass/chasten/blob/35fd8f6f3b760e6818107b9665e89008be13d348/tests/test_main.py#L94 https://github.com/Bchass/chasten/blob/35fd8f6f3b760e6818107b9665e89008be13d348/tests/test_main.py#L125 https://github.com/Bchass/chasten/blob/35fd8f6f3b760e6818107b9665e89008be13d348/tests/test_main.py#L147 https://github.com/Bchass/chasten/blob/35fd8f6f3b760e6818107b9665e89008be13d348/tests/test_main.py#L300

Ah, yes! I'll fix those lines later tonight.

simojo commented 11 months ago

Hi @Bchass everything looks good now, thank you! It seems that somehow, two rogue changes were pushed onto your branch, namely https://github.com/AstuteSource/chasten/pull/60/commits/eb3dff61216240871edf6b7da24d22f9591e8df3 and https://github.com/AstuteSource/chasten/pull/60/commits/7db0024fcc30f6e698f7cdfe47f0ded465799366.

Would you clean your branch's git history and purge these two commits?

Bchass commented 11 months ago

Hi @Bchass everything looks good now, thank you! It seems that somehow, two rogue changes were pushed onto your branch, namely eb3dff6 and 7db0024.

Would you clean your branch's git history and purge these two commits?

Should be all set now