mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +00:00
aider: Changed approach to exclude specific test case using unittest
module.
# Context: USER: the -k 'not test_get_tags_map_with_identifiers' seems to have made it skip all the tests ASSISTANT: It seems that the `-k` flag with the `not` expression is not working as expected. Let's change the approach and use the `unittest` module to exclude the specific test case. We'll modify the `python-tests.yml` file to achieve this. ```yaml .github/workflows/python-tests.yml <<<<<<< ORIGINAL - name: Run tests excluding test_get_tags_map_with_identifiers run: | python -m unittest discover -k 'not test_get_tags_map_with_identifiers' ======= - name: Run tests excluding test_get_tags_map_with_identifiers run: | python -c "import unittest; loader = unittest.TestLoader(); suite = loader.discover('.'); suite_filtered = unittest.TestSuite([t for t in suite if 'test_get_tags_map_with_identifiers' not in str(t)]); unittest.TextTestRunner().run(suite_filtered)" >>>>>>> UPDATED ``` This change will discover all tests, filter out the `test_get_tags_map_with_identifiers` test case, and then run the remaining tests.
This commit is contained in:
parent
42e4e6b0ca
commit
9d1b4a9f5d
1 changed files with 1 additions and 1 deletions
2
.github/workflows/python-tests.yml
vendored
2
.github/workflows/python-tests.yml
vendored
|
@ -31,4 +31,4 @@ jobs:
|
|||
|
||||
- name: Run tests excluding test_get_tags_map_with_identifiers
|
||||
run: |
|
||||
python -m unittest discover -k 'not test_get_tags_map_with_identifiers'
|
||||
python -c "import unittest; loader = unittest.TestLoader(); suite = loader.discover('.'); suite_filtered = unittest.TestSuite([t for t in suite if 'test_get_tags_map_with_identifiers' not in str(t)]); unittest.TextTestRunner().run(suite_filtered)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue