dbcli / mycli

A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting.
http://mycli.net
Other
11.42k stars 661 forks source link

Restore file test/myclirc from repository after test writes #930

Closed rolandwalker closed 3 years ago

rolandwalker commented 3 years ago

Description

This test https://github.com/dbcli/mycli/blob/4517f49efdcc167a672bce9fdb922bb7224ce5f5/test/test_special_iocommands.py#L83-L90

writes to test/myclirc, leaving it "modified" in the worktree, according to git status, after the test suite is run.

We can simply check out a fresh copy of the file after running the tests. If the git executable is not present, or the code is not in a checked-out repository, the command will silently fail.

Checklist

amjith commented 3 years ago

:pineapple: