From 80c0799d1a522817246a3a8a6c74627285895d4a Mon Sep 17 00:00:00 2001 From: erik Date: Mon, 20 Feb 2023 16:45:36 +0100 Subject: [PATCH] Add proper imports --- test/test_version_class.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/test/test_version_class.py b/test/test_version_class.py index a6782b4..906ddb5 100644 --- a/test/test_version_class.py +++ b/test/test_version_class.py @@ -1,7 +1,25 @@ +from pathlib import Path +import sys +import os + +# getting the name of the directory +# where the this file is present. +current = os.path.dirname(os.path.realpath(__file__)) + +# Getting the parent directory name +# where the current directory is present. +parent = os.path.dirname(current) + +# adding the parent directory to +# the sys.path. +sys.path.append(parent) + +# now we can import the module in the parent +# directory. + from version import Version from version_repository import VersionRepository -from release_type import ReleaseType -from pathlib import Path +from release_type import ReleaseType def test_version(): version = Version([1, 2, 3], False)