-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Removes the old setup.[py,cfg] in favour of a modern pyproject.toml - Remove Tox in favour of Hatch - Add tests!
- Loading branch information
Showing
17 changed files
with
308 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
.tox/ | ||
.hatch/ | ||
.stestr/ | ||
db_testtools.egg-info/ | ||
__pycache__/ | ||
*.pyc | ||
dbtesttools/_version.py | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,28 @@ | ||
{ | ||
"python.pythonPath": "${workspaceFolder}/.tox/py3/bin/python3", | ||
"python.formatting.provider": "black", | ||
"python.formatting.blackArgs": [ | ||
"[python]": { | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "ms-python.black-formatter", | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports": "explicit" | ||
} | ||
}, | ||
"black-formatter.args": [ | ||
"--line-length", | ||
"79" | ||
], | ||
"python.linting.flake8Enabled": true, | ||
"python.linting.enabled": true, | ||
"python.testing.pytestEnabled": false, | ||
"python.testing.nosetestsEnabled": false, | ||
"python.testing.unittestEnabled": true, | ||
"files.watcherExclude": { | ||
"**/.coverage/**": true, | ||
"**/.eggs": true, | ||
"**/.stestr/**": true, | ||
"**/.testrepository/**": true, | ||
"**/.tox/**": true | ||
"${workspaceFolder}/build/**": true, | ||
"**/.hatch/**": true | ||
}, | ||
"git.allowForcePush": true, | ||
"editor.wordWrapColumn": 79, | ||
"vim.textwidth": 79, | ||
"githubPullRequests.defaultMergeMethod": "rebase" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import os | ||
|
||
import testresources | ||
from testscenarios import generate_scenarios | ||
|
||
|
||
def load_tests(loader, tests, pattern): | ||
this_dir = os.path.dirname(__file__) | ||
mytests = loader.discover(start_dir=this_dir, pattern=pattern) | ||
result = testresources.OptimisingTestSuite() | ||
result.addTests(generate_scenarios(mytests)) | ||
result.addTests(generate_scenarios(tests)) | ||
return result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import sqlalchemy as sa | ||
from sqlalchemy.orm import declarative_base | ||
|
||
ModelBase = declarative_base() | ||
|
||
|
||
class TestModel(ModelBase): | ||
__tablename__ = "test_model" | ||
id = sa.Column(sa.Integer, primary_key=True) | ||
name = sa.Column(sa.String) | ||
value = sa.Column(sa.Integer) |
Oops, something went wrong.