Skip to content

Commit

Permalink
Add tests for pyproject.toml-style projects using flit
Browse files Browse the repository at this point in the history
Add two test cases for projects using flit as the build backend:

- testFlit: project without dependencies

- testFlitRequires: project with dependencies
  • Loading branch information
cjolowicz committed Oct 3, 2019
1 parent 58791e2 commit 8dc8607
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/fixtures/flit-requires/foobar.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""An amazing sample package!"""

__version__ = '0.1'
10 changes: 10 additions & 0 deletions test/fixtures/flit-requires/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[build-system]
requires = ["flit"]
build-backend = "flit.buildapi"

[tool.flit.metadata]
module = "foobar"
author = "Sir Robin"
author-email = "[email protected]"
home-page = "https://github.com/sirrobin/foobar"
requires = ["attrs >=19.1.0"]
3 changes: 3 additions & 0 deletions test/fixtures/flit/foobar.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""An amazing sample package!"""

__version__ = '0.1'
9 changes: 9 additions & 0 deletions test/fixtures/flit/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[build-system]
requires = ["flit"]
build-backend = "flit.buildapi"

[tool.flit.metadata]
module = "foobar"
author = "Sir Robin"
author-email = "[email protected]"
home-page = "https://github.com/sirrobin/foobar"
10 changes: 10 additions & 0 deletions test/run-features
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ testPoetryLock() {
assertCapturedSuccess
}

testFlit() {
compile "flit"
assertCapturedSuccess
}

testFlitRequires() {
compile "flit-requires"
assertCapturedSuccess
}

testNoRequirements() {
compile "no-requirements"
assertCapturedError
Expand Down

0 comments on commit 8dc8607

Please sign in to comment.