mirror of
https://github.com/google/go-jsonnet.git
synced 2025-09-28 17:01:02 +02:00
Replace setup.py test
with pytest command (#380)
Replace `setup.py test` with pytest command
This commit is contained in:
parent
e6572f5083
commit
413234ce49
@ -39,10 +39,13 @@ matrix:
|
||||
- echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
|
||||
- curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
|
||||
- sudo apt-get update && sudo apt-get install bazel make
|
||||
- sudo apt install python3-dev
|
||||
- pip install -U pytest --user
|
||||
script: make all
|
||||
|
||||
before_install:
|
||||
- sudo apt install python3-dev
|
||||
- pip install -U pytest --user
|
||||
- go get github.com/axw/gocov/gocov
|
||||
- go get github.com/mattn/goveralls
|
||||
- go get github.com/fatih/color
|
||||
|
7
setup.py
7
setup.py
@ -16,6 +16,7 @@ import os
|
||||
from setuptools import setup
|
||||
from setuptools import Extension
|
||||
from setuptools.command.build_ext import build_ext as BuildExt
|
||||
from setuptools.command.test import test as TestCommand
|
||||
from subprocess import Popen, PIPE
|
||||
|
||||
DIR = os.path.abspath(os.path.dirname(__file__))
|
||||
@ -45,6 +46,10 @@ class BuildJsonnetExt(BuildExt):
|
||||
|
||||
BuildExt.run(self)
|
||||
|
||||
class NoopTestCommand(TestCommand):
|
||||
def __init__(self, dist):
|
||||
print("_gojsonnet does not support running tests with 'python setup.py test'. Please run 'pytest'.")
|
||||
|
||||
jsonnet_ext = Extension(
|
||||
'_gojsonnet',
|
||||
sources=MODULE_SOURCES,
|
||||
@ -63,7 +68,7 @@ setup(name='gojsonnet',
|
||||
version=get_version(),
|
||||
cmdclass={
|
||||
'build_ext': BuildJsonnetExt,
|
||||
'test': NoopTestCommand,
|
||||
},
|
||||
ext_modules=[jsonnet_ext],
|
||||
test_suite="python._jsonnet_test",
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user