mirror of
				https://github.com/graphql-python/graphene.git
				synced 2025-11-04 01:47:45 +03:00 
			
		
		
		
	Added test extra requirements
This commit is contained in:
		
							parent
							
								
									8f373ccec3
								
							
						
					
					
						commit
						256c84a9a5
					
				| 
						 | 
				
			
			@ -22,8 +22,7 @@ before_install:
 | 
			
		|||
install:
 | 
			
		||||
- |
 | 
			
		||||
  if [ "$TEST_TYPE" = build ]; then
 | 
			
		||||
    pip install pytest pytest-cov pytest-benchmark coveralls six pytz iso8601
 | 
			
		||||
    pip install -e .
 | 
			
		||||
    pip install -e .[test]
 | 
			
		||||
    python setup.py develop
 | 
			
		||||
  elif [ "$TEST_TYPE" = lint ]; then
 | 
			
		||||
    pip install flake8
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										10
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								README.md
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -75,13 +75,19 @@ If you want to learn even more, you can also check the following [examples](exam
 | 
			
		|||
After cloning this repo, ensure dependencies are installed by running:
 | 
			
		||||
 | 
			
		||||
```sh
 | 
			
		||||
python setup.py install
 | 
			
		||||
pip install .[test]
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
After developing, the full test suite can be evaluated by running:
 | 
			
		||||
 | 
			
		||||
```sh
 | 
			
		||||
python setup.py test # Use --pytest-args="-v -s" for verbose mode
 | 
			
		||||
py.test graphene --cov=graphene --benchmark-skip # Use -v -s for verbose mode
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
You can also run the benchmarks with:
 | 
			
		||||
 | 
			
		||||
```sh
 | 
			
		||||
py.test graphene --benchmark-only
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										10
									
								
								README.rst
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								README.rst
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -89,13 +89,19 @@ After cloning this repo, ensure dependencies are installed by running:
 | 
			
		|||
 | 
			
		||||
.. code:: sh
 | 
			
		||||
 | 
			
		||||
    python setup.py install
 | 
			
		||||
    pip install .[test]
 | 
			
		||||
 | 
			
		||||
After developing, the full test suite can be evaluated by running:
 | 
			
		||||
 | 
			
		||||
.. code:: sh
 | 
			
		||||
 | 
			
		||||
    python setup.py test # Use --pytest-args="-v -s" for verbose mode
 | 
			
		||||
    py.test graphene --cov=graphene --benchmark-skip # Use -v -s for verbose mode
 | 
			
		||||
 | 
			
		||||
You can also run the benchmarks with:
 | 
			
		||||
 | 
			
		||||
.. code:: sh
 | 
			
		||||
 | 
			
		||||
    py.test graphene --benchmark-only
 | 
			
		||||
 | 
			
		||||
Documentation
 | 
			
		||||
~~~~~~~~~~~~~
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										20
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								setup.py
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -37,6 +37,17 @@ class PyTest(TestCommand):
 | 
			
		|||
        errno = pytest.main(self.pytest_args)
 | 
			
		||||
        sys.exit(errno)
 | 
			
		||||
 | 
			
		||||
tests_require = [
 | 
			
		||||
    'pytest>=2.7.2',
 | 
			
		||||
    'pytest-benchmark',
 | 
			
		||||
    'pytest-cov',
 | 
			
		||||
    'coveralls',
 | 
			
		||||
    'six',
 | 
			
		||||
    'mock',
 | 
			
		||||
    'pytz',
 | 
			
		||||
    'iso8601',
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
setup(
 | 
			
		||||
    name='graphene',
 | 
			
		||||
    version=version,
 | 
			
		||||
| 
						 | 
				
			
			@ -74,14 +85,9 @@ setup(
 | 
			
		|||
        'graphql-relay>=0.4.5',
 | 
			
		||||
        'promise>=1.0.1',
 | 
			
		||||
    ],
 | 
			
		||||
    tests_require=[
 | 
			
		||||
        'pytest>=2.7.2',
 | 
			
		||||
        'pytest-benchmark',
 | 
			
		||||
        'mock',
 | 
			
		||||
        'pytz',
 | 
			
		||||
        'iso8601',
 | 
			
		||||
    ],
 | 
			
		||||
    tests_require=tests_require,
 | 
			
		||||
    extras_require={
 | 
			
		||||
        'test': tests_require,
 | 
			
		||||
        'django': [
 | 
			
		||||
            'graphene-django',
 | 
			
		||||
        ],
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user