Skip to content
Snippets Groups Projects
Commit 4a2029fa authored by dh00601's avatar dh00601
Browse files

fixing failing tests

parent ed7b2039
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,6 @@ from binarycpython.utils.functions import *
TMP_DIR = temp_dir("tests", "test_functions")
class dummy:
"""
Dummy class to be used in the merge_dicts
......@@ -106,14 +105,16 @@ class test_temp_dir(unittest.TestCase):
Test making a temp directory and comparing that to what it should be
"""
#
binary_c_temp_dir = temp_dir()
username = get_username()
general_temp_dir = tempfile.gettempdir()
self.assertTrue(
os.path.isdir(os.path.join(general_temp_dir, "binary_c_python"))
os.path.isdir(os.path.join(general_temp_dir, "binary_c_python-{}".format(username)))
)
self.assertTrue(
os.path.join(general_temp_dir, "binary_c_python")
os.path.join(general_temp_dir, "binary_c_python-{}".format(username))
) == binary_c_temp_dir
......
......@@ -67,7 +67,7 @@ def check_if_in_shell():
return in_shell
def ANSI_colours(self):
def get_ANSI_colours():
# ANSI colours dictionary
foreground_colours = {
"red": Fore.RED,
......
......@@ -80,7 +80,7 @@ from binarycpython.utils.functions import (
trem,
conv_time_units,
mem_use,
ANSI_colours,
get_ANSI_colours,
check_if_in_shell,
format_number,
)
......@@ -175,7 +175,7 @@ class Population:
self.in_shell = check_if_in_shell()
# ANSI colours: use them if in a shell
self.ANSI_colours = ANSI_colours()
self.ANSI_colours = get_ANSI_colours()
if self.in_shell == False:
for c in self.ANSI_colours:
self.ANSI_colours[c] = ""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment