Jpp 21.0.0
the software that should make you happy
Loading...
Searching...
No Matches
test_core.py
Go to the documentation of this file.
1#!/usr/bin/env python3
2# -*- coding: utf-8 -*-
3import os
4import unittest
5
6from km3net_testdata import data_path, latest, LATEST_VERSIONS
7
8
9class TestDataPath(unittest.TestCase):
10 def test_access(self):
11 assert data_path("online/km3net_online.root").endswith("km3net_online.root")
12
14 with self.assertRaises(RuntimeError):
15 data_path("nonexistent_file")
16
18 filename = "nonexistent_file"
19 assert data_path(filename, raise_missing=False).endswith(filename)
20
21
22class TestLatest(unittest.TestCase):
24 for dataformat in LATEST_VERSIONS.keys():
25 assert latest(dataformat).endswith(LATEST_VERSIONS[dataformat])
test_filename_returned_if_raise_missing_is_false(self)
Definition test_core.py:17
test_accessing_nonexistent_files(self)
Definition test_core.py:13