Skip to content

git-test list throws exception if you have no tests #21

Description

@LemmingAvalanche

On 21048cc (“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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions