View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update | 
|---|---|---|---|---|---|
| 0000587 | file | General | public | 2024-12-12 12:19 | 2024-12-15 17:19 | 
| Reporter | georgthegreat | Assigned To | christos | ||
| Priority | normal | Severity | minor | Reproducibility | always | 
| Status | assigned | Resolution | open | ||
| Product Version | 5.46 | ||||
| Summary | 0000587: 5.46 has broken python code detection | ||||
| Description | The following pytest: ``` $ cat test_magic.py import magic def test_buffer(): res = magic.from_buffer('<html></html>') assert res == 'HTML document, ASCII text, with no line terminators' def test_file(): res = magic.from_file('contrib/tests/python-magic/test_magic.py') assert res == 'Python script, ASCII text executable' ``` is detected as ascii test | ||||
| Steps To Reproduce | ``` file test_magic.py test_magic.py: HTML document, ASCII text ``` | ||||
| Additional Information | With 5.45 it worked just fine | ||||
| Tags | No tags attached. | ||||
|  | How do I test this? | 
|  | I do not quite undestand the problem with testing. Just save the code into `test_magic.py` and apply `file` to it. Steps to reproduce section covers exactly that. This example is written using python-magic binding, but this does not matter at all. | 
| Date Modified | Username | Field | Change | 
|---|---|---|---|
| 2024-12-12 12:19 | georgthegreat | New Issue | |
| 2024-12-15 13:05 | christos | Assigned To | => christos | 
| 2024-12-15 13:05 | christos | Status | new => assigned | 
| 2024-12-15 13:05 | christos | Status | assigned => feedback | 
| 2024-12-15 13:05 | christos | Note Added: 0004132 | |
| 2024-12-15 17:19 | georgthegreat | Note Added: 0004133 | |
| 2024-12-15 17:19 | georgthegreat | Status | feedback => assigned | 
