| 1 |
# (C) Copyright 2007-2025 Enthought, Inc., Austin, TX |
| 2 |
# All rights reserved. |
| 3 |
# |
| 4 |
# This software is provided without warranty under the terms of the BSD |
| 5 |
# license included in LICENSE.txt and may be redistributed only under |
| 6 |
# the conditions described in the aforementioned license. The license |
| 7 |
# is also available online at http://www.enthought.com/licenses/BSD.txt |
| 8 |
# |
| 9 |
# Thanks for using Enthought open source! |
| 10 |
import os |
| 11 |
import sys |
| 12 |
import unittest |
| 13 |
|
| 14 |
from envisage.examples._demo import demo_path |
| 15 |
|
| 16 |
|
| 17 |
class TestDemoUtilities(unittest.TestCase): |
| 18 |
"""Test utility functions in the _demo module.""" |
| 19 |
|
| 20 |
def test_sys_path_inserted(self): |
| 21 |
path = os.path.join("dirname", "file.py") |
| 22 |
with demo_path(path): |
| 23 |
self.assertIn("dirname", sys.path) |
| 24 |
self.assertNotIn("dirname", sys.path) |