GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — python-ticket/features/environment.py at master · sjaandi-project/python-ticket Expand file tree/ Copy pathenvironment.pyMore file actions 48 lines (35 loc) · 1.45 KB / Copy pathenvironment.pyFile metadata and controls48 lines (35 loc) · 1.45 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 """Behave environment setup for ticket CLI tests.""" import os import shutil import tempfile from pathlib import Path def before_all(context): """Set up test environment before all tests.""" # Store the project directory (where the ticket script lives) context.project_dir = Path(__file__).parent.parent.resolve() # Add project plugins to PATH so extracted commands are found plugins_dir = context.project_dir / 'plugins' if plugins_dir.exists(): os.environ['PATH'] = str(plugins_dir) + ':' + os.environ.get('PATH', '') def before_scenario(context, scenario): """Create a fresh temporary directory for each scenario.""" # Create a temporary directory for this scenario context.test_dir = tempfile.mkdtemp(prefix='ticket_test_') # Initialize tracking context.tickets = {} context.last_created_id = None context.stdout = '' context.stderr = '' context.returncode = None def after_scenario(context, scenario): """Clean up temporary directories after each scenario.""" if hasattr(context, 'test_dir') and os.path.exists(context.test_dir): shutil.rmtree(context.test_dir) if hasattr(context, 'plugin_dir') and os.path.exists(context.plugin_dir): shutil.rmtree(context.plugin_dir) def before_feature(context, feature): """Called before each feature file is processed.""" pass def after_feature(context, feature): """Called after each feature file is processed.""" pass |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |