Пример #1
0
def test_Inside_the_set_time_1():
    start = time.time()
    x = "no"
    m = Inside_the_set(x)
    m
    end = time.time()
    assert (end - start) < 60
Пример #2
0
def test_Inside_the_set_time_2():
    start = time.time()
    x = "yes"
    m = Inside_the_set(x)
    m
    end = time.time()
    assert (end - start) < 120
Пример #3
0
def test_Inside_the_set_1():
    x = "no"
    im = Inside_the_set(x)
    assert str(type(im)) == "<class 'matplotlib.image.AxesImage'>"
Пример #4
0
im = plt.imshow(Z_1.Mandelbrotset, cmap='binary')
anim = animation.FuncAnimation(fig,
                               animate,
                               frames=np.arange(15),
                               interval=400,
                               blit=False)
plt.show()
end_1 = time.time()
print(
    "Time spent to animate the zoom on the Mandelbrotset:  {0:.5f} s.".format(
        end_1 - start_1))

start_2 = time.time()
x = input(
    "Do you want to save each frame of the animation in a folder ? This will slow the animation. Answer 'yes' or 'no' without quotes :"
)
Inside_the_set(x)
end_2 = time.time()
print("Time spent to animate the zoom inside the Mandelbrotset:  {0:.5f} s.".
      format(end_2 - start_2))

start_3 = time.time()
x = input(
    'Which one do you want to plot ("Elephant valley", "Triple squared valley" or "mini mandelbrot". Write the answer without quotes)?'
)
plot_patterns(x)
end_3 = time.time()
print(
    "Time spent to plot a characteristic pattern:  {0:.5f} s.".format(end_3 -
                                                                      start_3))