From e9a1f6a44706837cccc0438d3e50921969e03358 Mon Sep 17 00:00:00 2001 From: Ryan Marren Date: Thu, 18 Oct 2018 12:49:32 -0400 Subject: [PATCH 1/3] Fix path issue. --- tests/development/test_component_loader.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/development/test_component_loader.py b/tests/development/test_component_loader.py index bbcf91e669..1be925b02a 100644 --- a/tests/development/test_component_loader.py +++ b/tests/development/test_component_loader.py @@ -1,6 +1,7 @@ import collections import json import os +import sys import shutil import unittest from dash.development.component_loader import load_components, generate_classes @@ -164,12 +165,13 @@ def setUp(self): init_file_path = 'default_namespace/__init__.py' with open(init_file_path, 'a'): os.utime(init_file_path, None) + # This is not the case on Python 3 CI boxes for some reason + sys.path.append(os.getcwd() + '/') def tearDown(self): os.remove(METADATA_PATH) shutil.rmtree('default_namespace') - @unittest.skip('Broken - https://github.com/plotly/dash/issues/419') def test_loadcomponents(self): MyComponent_runtime = generate_class( 'MyComponent', From c2454e34a813f63e65bee83a6efb29f44702b23b Mon Sep 17 00:00:00 2001 From: Ryan Marren Date: Thu, 18 Oct 2018 12:53:28 -0400 Subject: [PATCH 2/3] Try to fix just by not using python -m venv --- .circleci/config.yml | 2 +- tests/development/test_component_loader.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1fec151261..ff25e415d6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,7 +26,7 @@ jobs: name: Install dependencies command: | sudo pip install virtualenv - python -m venv venv || virtualenv venv + virtualenv venv . venv/bin/activate pip install -r $REQUIREMENTS_FILE diff --git a/tests/development/test_component_loader.py b/tests/development/test_component_loader.py index 1be925b02a..e36de5f922 100644 --- a/tests/development/test_component_loader.py +++ b/tests/development/test_component_loader.py @@ -165,8 +165,6 @@ def setUp(self): init_file_path = 'default_namespace/__init__.py' with open(init_file_path, 'a'): os.utime(init_file_path, None) - # This is not the case on Python 3 CI boxes for some reason - sys.path.append(os.getcwd() + '/') def tearDown(self): os.remove(METADATA_PATH) From df5111e006582013f66114ba73614da8f53338e3 Mon Sep 17 00:00:00 2001 From: Ryan Marren Date: Thu, 18 Oct 2018 13:04:54 -0400 Subject: [PATCH 3/3] remove sys import --- tests/development/test_component_loader.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/development/test_component_loader.py b/tests/development/test_component_loader.py index e36de5f922..b0f826625e 100644 --- a/tests/development/test_component_loader.py +++ b/tests/development/test_component_loader.py @@ -1,7 +1,6 @@ import collections import json import os -import sys import shutil import unittest from dash.development.component_loader import load_components, generate_classes