git-test icon indicating copy to clipboard operation
git-test copied to clipboard

`git-test list` throws exception if you have no tests

Open LemmingAvalanche opened this issue 4 years ago • 0 comments

On 21048cca949f (“Merge pull request #19 from mhagger/iter-tests”, 2021-05-03).

$ # Remove only test
$ ~/git-test/bin/git-test remove
$ ~/git-test/bin/git-test list
Traceback (most recent call last):
  File "/home/kristoffer/git-test/bin/git-test", line 1129, in <module>
    main(sys.argv[1:])
  File "/home/kristoffer/git-test/bin/git-test", line 1118, in main
    cmd_list(parser, options)
  File "/home/kristoffer/git-test/bin/git-test", line 832, in cmd_list
    for test in iter_tests():
  File "/home/kristoffer/git-test/bin/git-test", line 543, in iter_tests
    out = check_output(cmd)
  File "/home/kristoffer/git-test/bin/git-test", line 227, in check_output
    raise CalledProcessError(e.returncode, e.cmd, _decode_output(e.output))
subprocess.CalledProcessError: Command '['git', 'config', '--get-regexp', '--null', '^test\\.']' returned non-zero exit status 1
$ ~/git-test/bin/git-test add 'mvn --batch-mode -DskipTests=false surefire:test'
$ ~/git-test/bin/git-test list
default:
    command = mvn --batch-mode -DskipTests=false surefire:test

LemmingAvalanche avatar Oct 09 '21 16:10 LemmingAvalanche