[python] Add tests for each module

This commit is contained in:
Émilie Feral
2020-04-01 15:41:48 +02:00
committed by LeaNumworks
parent ec5803f06f
commit cdff61f64b
7 changed files with 139 additions and 0 deletions

19
python/test/math.cpp Normal file
View File

@@ -0,0 +1,19 @@
#include <quiz.h>
#include "execution_environment.h"
QUIZ_CASE(python_math) {
TestExecutionEnvironment env = init_environement();
assert_command_execution_succeeds(env, "from math import *");
assert_command_execution_succeeds(env, "e", "2.718281828459045\n");
assert_command_execution_succeeds(env, "gamma(9)", "40320.0\n");
deinit_environment();
}
QUIZ_CASE(python_cmath) {
TestExecutionEnvironment env = init_environement();
assert_command_execution_succeeds(env, "from cmath import *");
assert_command_execution_succeeds(env, "cos(0)", "(1+-0j)\n");
deinit_environment();
}