# Path: tracer/resources/package.py
# class Package:
# 	"""Represents linux package"""
# 
# 	name = None  #: Name of the package
# 	modified = None  #: UNIX timestamp of the modification
# 	description = None
# 	category = None
# 	epoch = None
# 	version = None
# 	release = None
# 
# 	def __init__(self, name, modified=None):
# 		self.name = name
# 		self.modified = modified
# 
# 	def __eq__(self, package):
# 		"""Packages are equal when they have same name"""
# 		return (isinstance(package, self.__class__)
# 			and self.name == package.name)
# 
# 	def __ne__(self, package):
# 		return not self.__eq__(package)
# 
# 	def __repr__(self):
# 		return "<Package:" + self.name + ">"
# 
# 	def __str__(self):
# 		return self.name
# 
# 	def __hash__(self):
# 		return hash(self.name)
# 
# 	def load_info(self, package_manager):
# 		package_manager.load_package_info(self)


from .__meta__ import *
from tracer.resources.package import Package


class TestPackage(unittest.TestCase):

	def test_equality(self):
		p1 = Package("foo")
		p2 = Package("foo")
		p3 = Package("bar")

		self.assertEqual(p1, p2)
		self.assertNotEqual(p1, p3)

	def test_representation(self):

# Path: tracer/resources/package.py
# class Package:
# 	"""Represents linux package"""
# 
# 	name = None  #: Name of the package
# 	modified = None  #: UNIX timestamp of the modification
# 	description = None
# 	category = None
# 	epoch = None
# 	version = None
# 	release = None
# 
# 	def __init__(self, name, modified=None):
# 		self.name = name
# 		self.modified = modified
# 
# 	def __eq__(self, package):
# 		"""Packages are equal when they have same name"""
# 		return (isinstance(package, self.__class__)
# 			and self.name == package.name)
# 
# 	def __ne__(self, package):
# 		return not self.__eq__(package)
# 
# 	def __repr__(self):
# 		return "<Package:" + self.name + ">"
# 
# 	def __str__(self):
# 		return self.name
# 
# 	def __hash__(self):
# 		return hash(self.name)
# 
# 	def load_info(self, package_manager):
# 		package_manager.load_package_info(self)


# Path: tests/test_package.py
from .__meta__ import *
from tracer.resources.package import Package



class TestPackage(unittest.TestCase):

	def test_equality(self):
		p1 = Package("foo")
		p2 = Package("foo")
		p3 = Package("bar")

		self.assertEqual(p1, p2)
		self.assertNotEqual(p1, p3)

	def test_representation(self):

		package = Package("foo")