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:
Paul Gauthier 2023-05-27 14:08:32 -07:00
parent 42e4e6b0ca
commit 9d1b4a9f5d

View file

@ -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)"