You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
702 B

"""Tests for metadata_reader"""
___license___ = "MIT"
___dependencies___ = ["upip:unittest", "metadata_reader"]
___foo___ = "bar"
___flag___ = True
___list___ = ["a", "b", "c"]
import unittest
from metadata_reader import read_metadata
class TestMetadataReader(unittest.TestCase):
def test_reader(self):
with open("lib/", "rt") as file:
data = read_metadata(file)
self.assertIn("Tests for", data["doc"])
self.assertEqual(data["foo"], "bar")
self.assertEqual(data["flag"], True)
self.assertEqual(data["list"], ["a", "b", "c"])
if __name__ == '__main__':