Skip to content

Commit 7a65ab1

Browse files
committed
Add tests for pyproject.toml-style projects using flit
Add two test cases for projects using flit as the build backend: - testFlit: project without dependencies - testFlitRequires: project with dependencies
1 parent 0422f56 commit 7a65ab1

File tree

5 files changed

+35
-0
lines changed

5 files changed

+35
-0
lines changed

test/fixtures/flit-requires/foobar.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"""An amazing sample package!"""
2+
3+
__version__ = '0.1'
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[build-system]
2+
requires = ["flit"]
3+
build-backend = "flit.buildapi"
4+
5+
[tool.flit.metadata]
6+
module = "foobar"
7+
author = "Sir Robin"
8+
author-email = "[email protected]"
9+
home-page = "https://github.com/sirrobin/foobar"
10+
requires = ["attrs >=19.1.0"]

test/fixtures/flit/foobar.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"""An amazing sample package!"""
2+
3+
__version__ = '0.1'

test/fixtures/flit/pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[build-system]
2+
requires = ["flit"]
3+
build-backend = "flit.buildapi"
4+
5+
[tool.flit.metadata]
6+
module = "foobar"
7+
author = "Sir Robin"
8+
author-email = "[email protected]"
9+
home-page = "https://github.com/sirrobin/foobar"

test/run-features

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,16 @@ testPoetryLock() {
8080
assertCapturedSuccess
8181
}
8282

83+
testFlit() {
84+
compile "flit"
85+
assertCapturedSuccess
86+
}
87+
88+
testFlitRequires() {
89+
compile "flit-requires"
90+
assertCapturedSuccess
91+
}
92+
8393
testNoRequirements() {
8494
compile "no-requirements"
8595
assertCapturedError

0 commit comments

Comments
 (0)