| 30 | |
| 31 | |
| 32 | def test_no_attr(testrepo: Repository) -> None: |
| 33 | assert testrepo.get_attr('file', 'foo') is None |
| 34 | |
| 35 | with (Path(testrepo.workdir) / '.gitattributes').open('w+') as f: |
| 36 | print('*.py text\n', file=f) |
| 37 | print('*.jpg -text\n', file=f) |
| 38 | print('*.sh eol=lf\n', file=f) |
| 39 | |
| 40 | assert testrepo.get_attr('file.py', 'foo') is None |
| 41 | assert testrepo.get_attr('file.py', 'text') |
| 42 | assert not testrepo.get_attr('file.jpg', 'text') |
| 43 | assert 'lf' == testrepo.get_attr('file.sh', 'eol') |
| 44 | |
| 45 | |
| 46 | def test_no_attr_aspath(testrepo: Repository) -> None: |