Stop Viper from leaking across many of the tests (now tests pass regardless of order tested)

This commit is contained in:
spf13
2015-05-20 02:21:21 -04:00
parent 599d1b9786
commit a584ff207b
15 changed files with 223 additions and 101 deletions

View File

@@ -177,10 +177,12 @@ func TestFigureImgWidth(t *testing.T) {
}
func TestHighlight(t *testing.T) {
viper.Reset()
defer viper.Reset()
if !helpers.HasPygments() {
t.Skip("Skip test as Pygments is not installed")
}
defer viper.Set("PygmentsStyle", viper.Get("PygmentsStyle"))
viper.Set("PygmentsStyle", "bw")
tem := tpl.New()