gnu: python-synphot: Enable tests.
* gnu/packages/astronomy.scm (python-synphot): Enable tests.
[arguments]{phases}: Add 'prepare-test-environment phase.
Change-Id: Ie577ef16794fbd99ec73e39bdc8d8e1645e35532
Signed-off-by: Eric Bavier <bavier@posteo.net>
			
			
This commit is contained in:
		
							parent
							
								
									ba3a3aa311
								
							
						
					
					
						commit
						1144680dab
					
				
					 1 changed files with 15 additions and 3 deletions
				
			
		| 
						 | 
					@ -3712,9 +3712,21 @@ datetime object.")
 | 
				
			||||||
    (build-system pyproject-build-system)
 | 
					    (build-system pyproject-build-system)
 | 
				
			||||||
    (arguments
 | 
					    (arguments
 | 
				
			||||||
     (list
 | 
					     (list
 | 
				
			||||||
      ;; XXX: Test needs more love to pass.
 | 
					      #:phases
 | 
				
			||||||
      ;; ERROR collecting synphot/tests/test_utils.py
 | 
					      #~(modify-phases %standard-phases
 | 
				
			||||||
      #:tests? #f))
 | 
					          (add-before 'check 'prepare-test-environment
 | 
				
			||||||
 | 
					            (lambda _
 | 
				
			||||||
 | 
					              (invoke "python" "setup.py" "build_ext" "--inplace")
 | 
				
			||||||
 | 
					              ;; To solve pytest/conftest issue. Pytest tries to load all
 | 
				
			||||||
 | 
					              ;; files with word 'test' in them.
 | 
				
			||||||
 | 
					              ;;
 | 
				
			||||||
 | 
					              ;; ImportError while loading conftest ...
 | 
				
			||||||
 | 
					              ;; _pytest.pathlib.ImportPathMismatchError: ...
 | 
				
			||||||
 | 
					              ;;
 | 
				
			||||||
 | 
					              (call-with-output-file "pytest.ini"
 | 
				
			||||||
 | 
					                (lambda (port)
 | 
				
			||||||
 | 
					                  (format port "[pytest]
 | 
				
			||||||
 | 
					python_files = test_*.py"))))))))
 | 
				
			||||||
    (propagated-inputs (list python-astropy python-numpy python-scipy))
 | 
					    (propagated-inputs (list python-astropy python-numpy python-scipy))
 | 
				
			||||||
    (native-inputs (list python-pytest python-pytest-astropy
 | 
					    (native-inputs (list python-pytest python-pytest-astropy
 | 
				
			||||||
                         python-setuptools-scm))
 | 
					                         python-setuptools-scm))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue