implement basic testing fixtures and linting #19
							
								
								
									
										4
									
								
								.vscode/launch.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.vscode/launch.json
									
									
									
									
										vendored
									
									
								
							| @@ -26,11 +26,11 @@ | ||||
|             "name": "Backend - tester", | ||||
|             "type": "debugpy", | ||||
|             "request": "launch", | ||||
|             "program": "src/tester.py", | ||||
|             "program": "backend/src/tester.py", | ||||
|             "env": { | ||||
|                 "DEBUG": "true" | ||||
|             }, | ||||
|             "cwd": "${workspaceFolder}/backend" | ||||
|             "cwd": "${workspaceFolder}" | ||||
|         }, | ||||
|         // frontend - flutter app | ||||
|         { | ||||
|   | ||||
| @@ -8,6 +8,7 @@ pylint = "*" | ||||
| pytest = "*" | ||||
| tomli = "*" | ||||
| exceptiongroup = "*" | ||||
| httpx = "*" | ||||
|  | ||||
| [packages] | ||||
| numpy = "*" | ||||
|   | ||||
							
								
								
									
										1461
									
								
								backend/Pipfile.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										1461
									
								
								backend/Pipfile.lock
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -1,12 +1,12 @@ | ||||
| import logging | ||||
| import yaml | ||||
|  | ||||
| from utils.landmarks_manager import LandmarkManager | ||||
| from utils.optimizer import Optimizer | ||||
| from utils.refiner import Refiner | ||||
| from structs.landmark import Landmark | ||||
| from structs.linked_landmarks import LinkedLandmarks | ||||
| from structs.preferences import Preferences, Preference | ||||
| from .utils.landmarks_manager import LandmarkManager | ||||
| from .utils.optimizer import Optimizer | ||||
| from .utils.refiner import Refiner | ||||
| from .structs.landmark import Landmark | ||||
| from .structs.linked_landmarks import LinkedLandmarks | ||||
| from .structs.preferences import Preferences, Preference | ||||
|  | ||||
|  | ||||
| logger = logging.getLogger(__name__) | ||||
|   | ||||
| @@ -39,12 +39,14 @@ def load_trip_landmarks(client, first_uuid): | ||||
|     landmarks = [] | ||||
|     next_uuid = first_uuid | ||||
|  | ||||
|     i = 0 | ||||
|  | ||||
|     while next_uuid is not None: | ||||
|         landmark_data = fetch_landmark(next_uuid) | ||||
|         landmark_data = fetch_landmark(client, next_uuid) | ||||
|         landmarks.append(Landmark(**landmark_data))  # Create Landmark objects | ||||
|  | ||||
|         # Prepare for the next iteration | ||||
|         next_uuid = landmark_data.get(client, 'next_uuid')  # Assuming landmark data contains 'next_uuid' | ||||
|         next_uuid = landmark_data.get('next_uuid')  # Assuming landmark data contains 'next_uuid' | ||||
|  | ||||
|     # Create and return a LinkedLandmarks object with the collected landmarks | ||||
|     return landmarks | ||||
| @@ -82,6 +84,7 @@ def test_1(client): | ||||
|     landmarks = load_trip_landmarks(client, result['first_landmark_uuid']) | ||||
|  | ||||
|     assert isinstance(landmarks, list) | ||||
|     assert len(landmarks) > 2 | ||||
|  | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user