def test_exception_extend1(self): slovnik = dict() raised = False try: slovnik = extendedSearch("windows", False, "HI", 0, "Bill", False,False, False, [], 30, False, 0) except: raised = True self.assertEquals(raised, True)
def test_searching_extend1(self): slovnik = dict() raised=False try: slovnik = extendedSearch("windows", False, False, "Fact", "Bill", False, False, True, [ 1900, 2000], False, False, 0) except: raised=True self.assertEquals(raised, False)
def test_exception_extend2(self): slovnik = dict() raised = False try: slovnik = extendedSearch("windows", False, False,False, "Fact", "Bill", False, True, [ 1900, 2000], 30, False, 66) except: raised = True self.assertEquals(raised, True)
def test_searching_extend3(self): slovnik = dict() slovnik = extendedSearch("nieco", False, False, "Fact", "Bill", False, False, True, [ 1900, 2000], False, False, 0) self.assertEquals(len(slovnik), 0)
sys.exit(1) elif (options.engine == "citeseerx"): if (options.type == "BASIC"): try: slovnik = basicSearch(options.phrase, options.citation, options.sort) except ValueError: print "Chybna hodnota vstupnych parametrov" sys.exit(1) except Exception: "Chyba pri pripajani/chyba v typoch parametrov" sys.exit(1) else: try: slovnik = extendedSearch( options.phrase, options.title, options.author, options.authoraffi, options.publicvenue, options.keywords, options.abstract, Year, zoznam, options.mincitations,options.citation, options.sort) except ValueError: print "Chybna hodnota vstupnych parametrov" sys.exit(1) except Exception: "Chyba pri pripajani/chyba v typoch parametrov" sys.exit(1) if (options.filename == "stdout"): pocet_poloziek = 0 if (options.engine == "citeseerx"): if (options.citation is False): pocet_poloziek = 10