Пример #1
0
    def test_reset_state(self):
        fuzz = fuzzy.FuzzyInteger(1, 1000)

        state = random.get_random_state()
        value = utils.evaluate_declaration(fuzz)

        random.set_random_state(state)
        value2 = utils.evaluate_declaration(fuzz)
        self.assertEqual(value, value2)
Пример #2
0
    def test_reset_state(self):
        fuzz = fuzzy.FuzzyInteger(1, 1000)

        state = random.get_random_state()
        value = utils.evaluate_declaration(fuzz)

        random.set_random_state(state)
        value2 = utils.evaluate_declaration(fuzz)
        self.assertEqual(value, value2)
Пример #3
0
    def test_reset_state(self):
        fuzz = fuzzy.FuzzyInteger(1, 1000)

        state = random.get_random_state()
        value = fuzz.evaluate(sequence=1, obj=None, create=False)

        random.set_random_state(state)
        value2 = fuzz.evaluate(sequence=1, obj=None, create=False)
        self.assertEqual(value, value2)