test_configsnap.py
def func4_error_handling_nooverwrite(self):
        """Don't overwrite by default"""
        test = self.whoami()
        o = self.run_command('./configsnap -t nooverwrite -p pre')
        if o.retcode != 0:
            self.failtest(test, "Exit code non-zero, initial run")
        else:
            print("%s PASS Exit code zero, initial run" % test)

        o = self.run_command('./configsnap -t nooverwrite -p pre')
        if o.retcode != 1:
            print(o.retcode)
            self.failtest(test, "Exit code not 1, second run")
        else:
            print("%s PASS Exit code 1, didn't overwrite, second run" % test)
Don't overwrite by default
Don't overwrite by default
Don ' t overwrite by default
def func4_error_handling_nooverwrite(self):
        test = self.whoami()
        o = self.run_command('./configsnap -t nooverwrite -p pre')
        if o.retcode != 0:
            self.failtest(test, "Exit code non-zero, initial run")
        else:
            print("%s PASS Exit code zero, initial run" % test)
        o = self.run_command('./configsnap -t nooverwrite -p pre')
        if o.retcode != 1:
            print(o.retcode)
            self.failtest(test, "Exit code not 1, second run")
        else:
            print("%s PASS Exit code 1, didn't overwrite, second run" % test)
def func4_error_handling_nooverwrite ( self ) : test = self . whoami ( ) o = self . run_command ( './configsnap -t nooverwrite -p pre' ) if o . retcode != 0 : self . failtest ( test , "Exit code non-zero, initial run" ) else : print ( "%s PASS Exit code zero, initial run" % test ) o = self . run_command ( './configsnap -t nooverwrite -p pre' ) if o . retcode != 1 : print ( o . retcode ) self . failtest ( test , "Exit code not 1, second run" ) else : print ( "%s PASS Exit code 1, didn't overwrite, second run" % test )
Don't overwrite by default
Don ' t overwrite by default
"""Don't overwrite by default"""
self