From 9d6b7fdec5e6417c6eb97e7562f1c8af5f849071 Mon Sep 17 00:00:00 2001 From: Arthur Golubtsov Date: Sat, 6 Jun 2020 10:16:45 +0300 Subject: [PATCH] test: Move drone related tests to drone dir --- {test => drone/tests}/animation_test.py | 10 ++++++---- {test => drone/tests}/assets/animation_1.csv | 0 {test => drone/tests}/assets/animation_2.csv | 0 {test => drone/tests}/assets/animation_3.csv | 0 {test => drone/tests}/assets/animation_4.csv | 0 5 files changed, 6 insertions(+), 4 deletions(-) rename {test => drone/tests}/animation_test.py (94%) rename {test => drone/tests}/assets/animation_1.csv (100%) rename {test => drone/tests}/assets/animation_2.csv (100%) rename {test => drone/tests}/assets/animation_3.csv (100%) rename {test => drone/tests}/assets/animation_4.csv (100%) diff --git a/test/animation_test.py b/drone/tests/animation_test.py similarity index 94% rename from test/animation_test.py rename to drone/tests/animation_test.py index 19dbe61..793a96e 100644 --- a/test/animation_test.py +++ b/drone/tests/animation_test.py @@ -6,12 +6,13 @@ import pytest # Add parent dir to PATH to import messaging_lib and config_lib current_dir = (os.path.dirname(os.path.realpath(__file__))) -lib_dir = os.path.realpath(os.path.join(current_dir, '../lib')) -modules_dir = os.path.realpath(os.path.join(current_dir, '../drone/modules')) +root_dir = os.path.realpath(os.path.join(current_dir,'../..')) +lib_dir = os.path.realpath(os.path.join(root_dir, 'lib')) +modules_dir = os.path.realpath(os.path.join(root_dir, 'drone/modules')) sys.path.insert(0, lib_dir) sys.path.insert(0, modules_dir) -print("PATH: {}".format(sys.path)) +# print("PATH: {}".format(sys.path)) from config import ConfigManager @@ -25,7 +26,8 @@ if not os.path.exists(spec_path): else: print("Successfully created the directory {}".format(spec_path)) -shutil.copy("../drone/config/spec/configspec_client.ini", spec_path) +configspec_path = os.path.realpath(os.path.join(root_dir,"drone/config/spec/configspec_client.ini")) +shutil.copy(configspec_path, spec_path) config = ConfigManager() config.load_config_and_spec(os.path.join(config_path,'client.ini')) diff --git a/test/assets/animation_1.csv b/drone/tests/assets/animation_1.csv similarity index 100% rename from test/assets/animation_1.csv rename to drone/tests/assets/animation_1.csv diff --git a/test/assets/animation_2.csv b/drone/tests/assets/animation_2.csv similarity index 100% rename from test/assets/animation_2.csv rename to drone/tests/assets/animation_2.csv diff --git a/test/assets/animation_3.csv b/drone/tests/assets/animation_3.csv similarity index 100% rename from test/assets/animation_3.csv rename to drone/tests/assets/animation_3.csv diff --git a/test/assets/animation_4.csv b/drone/tests/assets/animation_4.csv similarity index 100% rename from test/assets/animation_4.csv rename to drone/tests/assets/animation_4.csv