import os
import sys

TEST_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
BOTS_DIR = os.path.join(os.path.dirname(TEST_DIR), "bots")
sys.path.append(os.path.join(BOTS_DIR, "machine"))
sys.path.append(os.path.join(TEST_DIR, "common"))

import os
import sys

TEST_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
BOTS_DIR = os.path.join(os.path.dirname(TEST_DIR), "bots")
sys.path.append(os.path.join(BOTS_DIR))  # for lib
sys.path.append(os.path.join(BOTS_DIR, "machine"))
sys.path.append(os.path.join(TEST_DIR, "common"))

Add bots root directory to parent.py