Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions apptools/persistence/tests/test_file_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,30 @@
from os.path import abspath, dirname, basename, join
from io import BytesIO

# 3rd party imports.
import pkg_resources

# Enthought library imports.
from apptools.persistence import state_pickler
from apptools.persistence import file_path


class Test:
def __init__(self):
self.f = file_path.FilePath()


class TestFilePath(unittest.TestCase):
def setUp(self):
# If the cwd is somewhere under /tmp, that confuses the tests below.
# Use the directory containing this file, instead.
test_cwd = pkg_resources.resource_filename("apptools.persistence", "")
self.old_cwd = os.getcwd()
os.chdir(test_cwd)

def tearDown(self):
os.chdir(self.old_cwd)

def test_relative(self):
"""Test if relative paths are set correctly.
"""
Expand Down