def test_read_nats_output_5ac(self): filename = os.path.join(THIS_DIR, '..', 'sample_data/NATS_demo_5_aircraft.csv') df = read_nats_output_file(filename) # Perform some basic consistency checks: self.assertEqual(len(df), 510) self.assertEqual(len(df['callsign'].unique()), 5) self.assertEqual(df.isnull().sum().sum(), 0)
def executeCommand(self): """ returns: command name to be passed to MapView, etc. results = dataframe of shape (# position records, 12) """ if self.filename == '': return ('readNATS', pd.DataFrame()) parentPath = str(Path(__file__).parent.parent.parent) results = read_nats_output_file( os.path.join(parentPath, 'NATS', self.filename)) print(results) return ["readNATS", results]
def test_read_nats_output(self): df = read_nats_output_file(sample_nats_file) # Simple check: self.assertEqual(len(df), 369)
def test_read_nats_output(self): df = read_nats_output_file(sample_nats_file) # Simple check: self.assertEqual(df.shape, (369, 15))