o
    ij                     @   sX   d dl mZ d dlZd dlZd dlZd dlmZ G dd dejZG dd dejZ	dS )    )
namedtupleN)json2packagec                   @   s   e Zd Zdd Zdd Zdd Zdd Zd	d
 Zdd Zdd Z	dd Z
dd Zdd Zdd Zdd Zdd Zdd Zdd Zdd  Zd!d" Zd#d$ Zd%d& Zd'd( Zd)d* Zd+d, Zd-S ).TestPackagec                 C   @   t jt jtd}tt| | _t	t| | _
d S )Nzpackage.jsonospathjoindirname__file__jsonloadsopenreadr   packageselfr    r   M/var/www/edux/Edux_v2/venv/lib/python3.10/site-packages/tests/test_package.pysetUp   
   zTestPackage.setUpc                 C   s   |  d| j  d S )Nz<Package yarg>)assertEqualsr   __repr__r   r   r   r   	test_repr   s   zTestPackage.test_reprc                 C      |  d| jj d S )Nyarg)r   r   namer   r   r   r   	test_name      zTestPackage.test_namec                 C   r   )Nz http://pypi.python.org/pypi/yarg)r   r   pypi_urlr   r   r   r   test_pypi_url      zTestPackage.test_pypi_urlc                 C   r   )NzThis is the short summary.)r   r   summaryr   r   r   r   test_summary   r   zTestPackage.test_summaryc                 C   r   )NzThis is the long description.)r   r   descriptionr   r   r   r   test_description   r"   zTestPackage.test_descriptionc                 C   r   )Nzhttps://kura.io/yarg/r   r   homepager   r   r   r   test_homepage"   r"   zTestPackage.test_homepagec                 C   r   )Nz#https://github.com/kura/yarg/issuesr   r   
bugtrackerr   r   r   r   test_bugtracker&   r"   zTestPackage.test_bugtrackerc                 C   r   )Nzhttp://yarg.readthedocs.org/r   r   docsr   r   r   r   	test_docs*   r"   zTestPackage.test_docsc                 C   &   t dd}| |ddd| jj d S )NAuthor
name emailKurakura@kura.ior   email)r   r   r   author)r   r7   r   r   r   test_author.      
zTestPackage.test_authorc                 C   r0   )N
Maintainerr2   r3   r4   r5   )r   r   r   
maintainer)r   r;   r   r   r   test_maintainer3   r9   zTestPackage.test_maintainerc                 C   r   )NMIT)r   r   licenser   r   r   r   test_license8   r"   zTestPackage.test_licensec                 C   r   )NzMIT License)r   r   license_from_classifiersr   r   r   r   test_license_from_classifiers<   r"   z)TestPackage.test_license_from_classifiersc                 C   s(   t dd}| |dddd| jj d S )N	Downloadszday week monthiф  i i0 )dayweekmonth)r   r   r   	downloads)r   rF   r   r   r   test_downloads@   s   
zTestPackage.test_downloadsc                 C      |  g d| jj d S )N)z+Development Status :: 5 - Production/StablezIntended Audience :: Developersz&License :: OSI Approved :: MIT LicensezProgramming Language :: Pythonz%Programming Language :: Python :: 2.6z%Programming Language :: Python :: 2.7z#Programming Language :: Python :: 3z%Programming Language :: Python :: 3.1z%Programming Language :: Python :: 3.2z%Programming Language :: Python :: 3.3z;Programming Language :: Python :: Implementation :: CPythonz8Programming Language :: Python :: Implementation :: PyPy)r   r   classifiersr   r   r   r   test_classifiersE   s   
zTestPackage.test_classifiersc                 C   rH   )N)0.0.0z0.0.20.0.15)r   r   release_idsr   r   r   r   test_release_idsT      
zTestPackage.test_release_idsc                 C   r   )NrL   r   r   latest_release_idr   r   r   r   test_latest_release_idX   r   z"TestPackage.test_latest_release_idc                 C   r   NTr   r   	has_wheelr   r   r   r   test_has_wheel[   r   zTestPackage.test_has_wheelc                 C   r   NFr   r   has_eggr   r   r   r   test_has_egg^   r   zTestPackage.test_has_eggc                 C   r   rS   r   r   
has_sourcer   r   r   r   test_has_sourcea   r   zTestPackage.test_has_sourcec                 C   rH   )N)z2.6z2.7z3.1z3.2z3.3)r   r   python_versionsr   r   r   r   test_python_versionsd   rO   z TestPackage.test_python_versionsc                 C   s   |  ddg| jj d S )NCPythonPyPy)r   r   python_implementationsr   r   r   r   test_python_implementationsh   rO   z'TestPackage.test_python_implementationsN)__name__
__module____qualname__r   r   r   r!   r$   r&   r)   r,   r/   r8   r<   r?   rA   rG   rJ   rN   rR   rV   rZ   r]   r_   rc   r   r   r   r   r   	   s.    r   c                   @   sL   e Zd Zdd Zdd Zdd Zdd Zd	d
 Zdd Zdd Z	dd Z
dS )TestPackageMissingDatac                 C   r   )Nz-package_no_homepage_bugtrack_one_release.jsonr   r   r   r   r   r   o   r   zTestPackageMissingData.setUpc                 C      |  d | jj d S Nr'   r   r   r   r   r)   v   r   z$TestPackageMissingData.test_homepagec                 C   rh   ri   r*   r   r   r   r   r,   y   r   z&TestPackageMissingData.test_bugtrackerc                 C   rh   ri   r-   r   r   r   r   r/   |   r   z TestPackageMissingData.test_docsc                 C   r   )NrK   rP   r   r   r   r   rR      r   z-TestPackageMissingData.test_latest_release_idc                 C   r   rW   rT   r   r   r   r   rV      r   z%TestPackageMissingData.test_has_wheelc                 C   r   rS   rX   r   r   r   r   rZ      r   z#TestPackageMissingData.test_has_eggc                 C   r   rW   r[   r   r   r   r   r]      r   z&TestPackageMissingData.test_has_sourceN)rd   re   rf   r   r)   r,   r/   rR   rV   rZ   r]   r   r   r   r   rg   m   s    rg   )
collectionsr   r   r   unittestyarg.packager   TestCaser   rg   r   r   r   r   <module>   s    d