Skip to content

Commit c4df34b

Browse files
committed
Run tests of generator bsync py library
1 parent 3ed469d commit c4df34b

File tree

4 files changed

+16
-14
lines changed

4 files changed

+16
-14
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ jobs:
2424
- name: Install poetry
2525
uses: abatilo/actions-poetry@v2.0.0
2626

27-
- name: Install poetry and pre-commit
27+
- name: Install poetry (and update) and pre-commit
2828
run: |
29-
poetry install
29+
poetry update
3030
poetry run pre-commit install
3131
3232
- name: Run pre-commit
@@ -35,7 +35,8 @@ jobs:
3535
- name: Run tests
3636
run: poetry run pytest
3737

38-
- name: Run Generator
38+
- name: Run Generator (BuildingSync 2.4)
3939
run: |
40-
echo "Whatever!"
41-
40+
curl -L -o bsyncpy/BuildingSync-2.4.xsd https://github.com/BuildingSync/schema/releases/download/v2.4.0/BuildingSync.xsd
41+
cd bsyncpy
42+
poetry run python bsyncpy_generator.py BuildingSync-2.4.xsd

poetry.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ lxml = "^4.6.3"
1111
[tool.poetry.dev-dependencies]
1212
pytest = "^6.2.5"
1313
pre-commit = "^2.15.0"
14+
virtualenv = "20.09.0"
1415

1516
[build-system]
1617
requires = ["poetry-core>=1.0.0"]

tests/test_bsyncpy.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def test_initialize():
99

1010

1111
def test_int_datatype():
12-
b = bsync.Sections.Section.Story(1)
12+
b = bsync.Sections.Section(bsync.Story(1))
1313
assert b is not None
1414

1515

@@ -49,13 +49,13 @@ def test_datetime():
4949
"""
5050
Added for https://github.com/BuildingSync/bsyncpy/issues/6
5151
"""
52-
dt = datetime.datetime(2019, 1, 1, 0, 0, 0)
53-
ts = bsync.TimeSeriesData.TimeSeries.StartTimestamp(dt)
52+
dt = datetime.datetime(2019, 1, 1, 8, 24, 59)
53+
ts = bsync.StartTimestamp(dt)
5454
assert ts is not None
5555
xml_representation = etree.tostring(ts.toxml())
5656
assert (
5757
xml_representation.decode("utf-8")
58-
== "<StartTimestamp>2019-01-01T00:00:00</StartTimestamp>"
58+
== "<StartTimestamp>2019-01-01T08:24:59</StartTimestamp>"
5959
)
6060

6161

0 commit comments

Comments
 (0)