def test_sourcemod_path(self): """SourceMod path in sys.path""" self.assert_( sourcemod.get_sourcemod_path().replace("\\", "/") in sys.path[0], "%s not found in %s" % (sourcemod.get_sourcemod_path().replace("\\", "/"), sys.path[0]), ) end = "thoushaltalwayskill" self.assert_( sourcemod.get_sourcemod_path(end).replace("\\", "/").endswith(end), '"%s" does not end with "%s"' % (sourcemod.get_sourcemod_path(end).replace("\\", "/"), end), )
def test_sourcemod_path(self): '''SourceMod path in sys.path''' self.assert_( sourcemod.get_sourcemod_path().replace('\\', '/') in sys.path[0], '%s not found in %s' % (sourcemod.get_sourcemod_path().replace('\\', '/'), sys.path[0])) end = 'thoushaltalwayskill' self.assert_( sourcemod.get_sourcemod_path(end).replace('\\', '/').endswith(end), '"%s" does not end with "%s"' % (sourcemod.get_sourcemod_path(end).replace('\\', '/'), end))
def outmods(cmd): mod = gen_mod(sourcemod, deep=True) base = sourcemod.get_sourcemod_path() + '/extensions/viper/headers/' output_header(base, mod) cmd.reply('Successfully outputted headers') return Plugin_Handled