Skip to content

Commit

Permalink
make tests directory a module
Browse files Browse the repository at this point in the history
  • Loading branch information
iskandr committed Jan 30, 2024
1 parent f86afb5 commit d90498c
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
7 changes: 7 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
./lint.sh && \
./test.sh && \
python3 -m pip install --upgrade build && \
python3 -m pip install --upgrade twine && \
rm -rf dist && \
python3 -m build && \
python3 -m twine upload dist/*
1 change: 1 addition & 0 deletions lint-and-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./lint.sh && ./test.sh
1 change: 1 addition & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest --cov=serializable/ --cov-report=term-missing tests
Empty file added tests/__init__.py
Empty file.
17 changes: 17 additions & 0 deletions tests/common.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

def eq_(x, y, s=None):
if s:
assert x == y, s
else:
assert x == y

0 comments on commit d90498c

Please sign in to comment.