|
a |
|
b/Tests/test_pyutils.any |
|
|
1 |
//pytest_markers=["slow"] |
|
|
2 |
#define ANYBODY_PATH_OUTPUT "." |
|
|
3 |
#include "libdef.any" |
|
|
4 |
|
|
|
5 |
|
|
|
6 |
Main = |
|
|
7 |
{ |
|
|
8 |
#include "<ANYBODY_PATH_MODELUTILS>/Python/Utils.any" |
|
|
9 |
|
|
|
10 |
AnyInt os_path_file_exists1 = PyUtils.os.path.exists("non existing file"); |
|
|
11 |
AnyInt os_path_file_exists2 = PyUtils.os.path.exists("test_pyutils.any"); |
|
|
12 |
AnyInt test_file_exists1 = expect(not(os_path_file_exists1)); |
|
|
13 |
AnyInt test_file_exists2 = expect(os_path_file_exists2); |
|
|
14 |
|
|
|
15 |
AnyString current_folder_name = PyUtils.os.path.basename(PyUtils.os.path.dirname(PyUtils.get_current_file())); |
|
|
16 |
AnyInt test_current_folder = expect(eqfun(current_folder_name, "Tests")); |
|
|
17 |
|
|
|
18 |
AnyString os_path_abspath = PyUtils.os.path.abspath("test_pyutils.any"); |
|
|
19 |
AnyString os_path_basename = PyUtils.os.path.basename(os_path_abspath); |
|
|
20 |
|
|
|
21 |
AnyInt test_abspath_basename = expect(eqfun(os_path_basename, "test_pyutils.any")); |
|
|
22 |
|
|
|
23 |
AnyOperationDummy RunTest = {}; |
|
|
24 |
|
|
|
25 |
|
|
|
26 |
}; |