mirror of
https://github.com/Aider-AI/aider
synced 2026-05-13 10:26:53 +02: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:
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)"
|
||||
|
||||
Reference in New Issue
Block a user