mirror of https://github.com/databricks/cli.git
24 lines
630 B
Go
24 lines
630 B
Go
package python
|
|
|
|
import (
|
|
"context"
|
|
"os"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestWheel(t *testing.T) {
|
|
wheel, err := BuildWheel(context.Background(), "internal/test/simple-python-wheel")
|
|
assert.NoError(t, err)
|
|
assert.Equal(t, "internal/test/simple-python-wheel/dist/dummy-0.0.1-py3-none-any.whl", wheel)
|
|
|
|
noFile(t, "internal/test/simple-python-wheel/dummy.egg-info")
|
|
noFile(t, "internal/test/simple-python-wheel/__pycache__")
|
|
noFile(t, "internal/test/simple-python-wheel/build")
|
|
}
|
|
|
|
func noFile(t *testing.T, name string) {
|
|
_, err := os.Stat(name)
|
|
assert.Error(t, err, "file %s should exist", name)
|
|
} |