<commit_before>from nose.tools import assert_almost_equal, assert_in, assert_equal, assert_false, assert_true
from ..graph import Greengraph

import os
import yaml

#Test the Greengraph class initialisation of start and end point
def test_Greengraph():
	''' 
	Description: A function to test the initialisation of Greengraph 
	Data Structure: Static [ within this function ['London','Glasgow'] ]
	'''
	userInput = Greengraph('London','Glasgow')
	assert_equal(userInput.start, 'London')
	assert_equal(userInput.end, 'Glasgow')
	
def test_geolocate():
	''' 
	Description: A function to test multiple locations and analyse the return of geolocate
	Data Source: YAML
	'''
	tObject =  Greengraph('','') #initiate the Greengraph object to access geolocate
	with open(os.path.join(os.path.dirname(__file__),'fixtures','graph_test_data.yaml')) as data:
		test_data = yaml.load(data)['test_geolocate']
		for point in test_data:
			city = point.pop('city')
			latitude = point.pop('latitude')
			longitude = point.pop('longitude')
			assert_equal(tObject.geolocate(city),(latitude,longitude))
	
	
	
def test_location_sequence():
	''' [INSERT COMMENT] '''
	pass
	
def test_green_between():
	''' [INSERT COMMENT] '''
	pass
	<commit_msg>Fixed issue with testing long/lat floating point<commit_after>from nose.tools import assert_almost_equal, assert_in, assert_equal, assert_false, assert_true
from ..graph import Greengraph

import os
import yaml

#Test the Greengraph class initialisation of start and end point
def test_Greengraph():
	''' 
	Description: A function to test the initialisation of Greengraph 
	Data Structure: Static [ within this function ['London','Glasgow'] ]
	'''
	userInput = Greengraph('London','Glasgow')
	assert_equal(userInput.start, 'London')
	assert_equal(userInput.end, 'Glasgow')
	
def test_geolocate():
	''' 
	Description: A function to test multiple locations and analyse the return of geolocate
	Data Source: YAML
	'''
	tObject =  Greengraph('','') #initiate the Greengraph object to access geolocate
	with open(os.path.join(os.path.dirname(__file__),'fixtures','graph_test_data.yaml')) as data:
		test_data = yaml.load(data)['test_geolocate']
		for point in test_data:
			city = point.pop('city')
			latitude = point.pop('latitude')
			longitude = point.pop('longitude')
			assert_almost_equal(tObject.geolocate(city),(latitude,longitude))
	
def test_location_sequence():
	''' [INSERT COMMENT] '''
	pass
	
def test_green_between():
	''' [INSERT COMMENT] '''
	pass
	
{'fraction_non_alphanumeric': 0.11866452131938858, 'fraction_numerical': 0.0, 'mean_word_length': 5.649732620320855, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4012912', 'n_tokens_mistral': 818, 'n_tokens_neox': 773, 'n_words': 214}