mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2025-12-12 22:40:09 +01:00
improve test coverage
This commit is contained in:
parent
d23689634c
commit
6b1a3e45d3
8 changed files with 118 additions and 162 deletions
|
|
@ -20,99 +20,3 @@ The recommended approach to using `pylint-ignore` is:
|
|||
3. If a message is a false positive, add a comment of this form to your code:
|
||||
`# pylint:disable=<symbol> ; explain why this is a false positive`
|
||||
|
||||
|
||||
# Overview
|
||||
|
||||
- [W0511: fixme (4x)](#w0511-fixme)
|
||||
- [W0703: broad-except (1x)](#w0703-broad-except)
|
||||
|
||||
|
||||
# W0511: fixme
|
||||
|
||||
## File src/pycalver/v1cli.py - Line 29 - W0511 (fixme)
|
||||
|
||||
- `message: TODO (mb 2020-10-03): This codepath is not tested since switch to`
|
||||
- `author : Manuel Barkhau <mbarkhau@gmail.com>`
|
||||
- `date : 2020-10-03T23:40:01`
|
||||
|
||||
```
|
||||
23: def update_cfg_from_vcs(cfg: config.Config, all_tags: typ.List[str]) -> config.Config:
|
||||
...
|
||||
27: return cfg
|
||||
28:
|
||||
> 29: # TODO (mb 2020-10-03): This codepath is not tested since switch to
|
||||
30: # v2 as default version_pattern.
|
||||
31: version_tags.sort(reverse=True)
|
||||
```
|
||||
|
||||
|
||||
## File src/pycalver/vcs.py - Line 80 - W0511 (fixme)
|
||||
|
||||
- `message: TODO (mb 2018-11-15): Detect encoding of output? Use chardet?`
|
||||
- `author : Manuel Barkhau <mbarkhau@gmail.com>`
|
||||
- `date : 2020-09-18T17:24:49`
|
||||
|
||||
```
|
||||
69: def __call__(self, cmd_name: str, env: Env = None, **kwargs: str) -> str:
|
||||
...
|
||||
78: output_data: bytes = sp.check_output(cmd_parts, env=env, stderr=sp.STDOUT)
|
||||
79:
|
||||
> 80: # TODO (mb 2018-11-15): Detect encoding of output? Use chardet?
|
||||
81: _encoding = "utf-8"
|
||||
82: return output_data.decode(_encoding)
|
||||
```
|
||||
|
||||
|
||||
## File test/test_config.py - Line 170 - W0511 (fixme)
|
||||
|
||||
- `message: TODO (mb 2020-09-18):`
|
||||
- `author : Manuel Barkhau <mbarkhau@gmail.com>`
|
||||
- `date : 2020-09-18T19:04:06`
|
||||
|
||||
```
|
||||
156: def test_parse_v2_cfg():
|
||||
...
|
||||
168: assert "setup.cfg" in cfg.file_patterns
|
||||
169:
|
||||
> 170: # TODO (mb 2020-09-18):
|
||||
171: # raw_patterns_by_filepath = _parse_raw_patterns_by_filepath(cfg)
|
||||
172: # assert raw_patterns_by_filepath["setup.py" ] == ["vYYYY0M.BUILD[-RELEASE]", "YYYY0M.BLD[PYTAGNUM]"]
|
||||
```
|
||||
|
||||
|
||||
## File src/pycalver/__main__.py - Line 421 - W0511 (fixme)
|
||||
|
||||
- `message: TODO (mb 2020-09-18): Investigate error messages`
|
||||
- `author : Manuel Barkhau <mbarkhau@gmail.com>`
|
||||
- `date : 2020-09-19T16:24:10`
|
||||
|
||||
```
|
||||
391: def _bump(
|
||||
...
|
||||
419: sys.exit(1)
|
||||
420: except Exception as ex:
|
||||
> 421: # TODO (mb 2020-09-18): Investigate error messages
|
||||
422: logger.error(str(ex))
|
||||
423: sys.exit(1)
|
||||
```
|
||||
|
||||
|
||||
# W0703: broad-except
|
||||
|
||||
## File src/pycalver/__main__.py - Line 420 - W0703 (broad-except)
|
||||
|
||||
- `message: Catching too general exception Exception`
|
||||
- `author : Manuel Barkhau <mbarkhau@gmail.com>`
|
||||
- `date : 2020-09-05T14:30:17`
|
||||
|
||||
```
|
||||
391: def _bump(
|
||||
...
|
||||
418: logger.error(str(ex))
|
||||
419: sys.exit(1)
|
||||
> 420: except Exception as ex:
|
||||
421: # TODO (mb 2020-09-18): Investigate error messages
|
||||
422: logger.error(str(ex))
|
||||
```
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue