Commit 28475e5b authored by carlosperate's avatar carlosperate

Fix unit test imports.

parent da6f1bd2
......@@ -19,6 +19,8 @@ before_install:
- brew install libcouchbase
- pip install mock
# Install node.js
- brew unlink node
- brew install node
......
......@@ -11,7 +11,14 @@ import os
import unittest
import mock
from ardublocklyserver.compilersettings import ServerCompilerSettings
try:
from ardublocklyserver.compilersettings import ServerCompilerSettings
except ImportError:
import sys
file_dir = os.path.dirname(os.path.realpath(__file__))
package_dir = os.path.dirname(os.path.dirname(file_dir))
sys.path.insert(0, package_dir)
from ardublocklyserver.compilersettings import ServerCompilerSettings
class ServerCompilerSettingsTestCase(unittest.TestCase):
......
......@@ -11,7 +11,14 @@ import os
import unittest
import mock
from ardublocklyserver import requesthandler
try:
from ardublocklyserver import requesthandler
except ImportError:
import sys
file_dir = os.path.dirname(os.path.realpath(__file__))
package_dir = os.path.dirname(os.path.dirname(file_dir))
sys.path.insert(0, package_dir)
from ardublocklyserver import requesthandler
class BlocklyRequestHandlerTestCase(unittest.TestCase):
......
......@@ -11,8 +11,16 @@ import os
import time
import unittest
from ardublocklyserver.sketchcreator import SketchCreator
from ardublocklyserver.compilersettings import ServerCompilerSettings
try:
from ardublocklyserver.sketchcreator import SketchCreator
from ardublocklyserver.compilersettings import ServerCompilerSettings
except ImportError:
import sys
file_dir = os.path.dirname(os.path.realpath(__file__))
package_dir = os.path.dirname(os.path.dirname(file_dir))
sys.path.insert(0, package_dir)
from ardublocklyserver.sketchcreator import SketchCreator
from ardublocklyserver.compilersettings import ServerCompilerSettings
class SketchCreatorTestCase(unittest.TestCase):
......
......@@ -30,9 +30,10 @@ dependencies:
- python --version
- python -c "import struct; print(struct.calcsize('P') * 8)"
# Install tkinker
# Install tkinker and mock
- sudo apt-get install -y python-support
- sudo apt-get install python-tk
- pip install mock
# Install node.js
- curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment