Skip to content

Commit

Permalink
fix test; make package use dev version by default
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenyu-ms committed Jan 2, 2025
1 parent 7110fe0 commit e141614
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
6 changes: 4 additions & 2 deletions testplan/exporters/testing/xml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,11 @@ def export(
)
xml_dir = pathlib.Path(self.cfg.xml_dir).resolve()

# TODO: what if xml_dir is a file?
if xml_dir.exists():
shutil.rmtree(xml_dir)
if xml_dir.is_dir():
shutil.rmtree(xml_dir)
else:
xml_dir.unlink()

xml_dir.mkdir(parents=True, exist_ok=True)

Expand Down
2 changes: 1 addition & 1 deletion testplan/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

__version__ = "24.9.2"

dev_build = int(os.environ.get("DEV_BUILD", "0"))
dev_build = int(os.environ.get("DEV_BUILD", "1"))
dev_suffix = f"dev{int(time.time())}" if dev_build else ""

__build_version__ = f"{__version__}{dev_suffix}"
4 changes: 4 additions & 0 deletions tests/functional/testplan/cli/data/curr.data
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,10 @@
"label": null,
"tags_index": {},
"information": [
[
"testplan_version",
"24.9.2.dev1735810598"
],
[
"user",
"unknown"
Expand Down
3 changes: 0 additions & 3 deletions tests/functional/testplan/runnable/interactive/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ def plan3(tmpdir):
],
"name": "ExampleSuite",
"parent_uids": ["InteractiveAPITest", "ExampleMTest"],
"part": None,
"status": "unknown",
"runtime_status": "ready",
"counter": {
Expand Down Expand Up @@ -312,7 +311,6 @@ def plan3(tmpdir):
],
"name": "ExampleSuite",
"parent_uids": ["InteractiveAPITest", "ExampleMTest"],
"part": None,
"status": "unknown",
"runtime_status": "ready",
"counter": {"failed": 0, "passed": 0, "total": 7, "unknown": 7},
Expand Down Expand Up @@ -440,7 +438,6 @@ def plan3(tmpdir):
"ExampleMTest",
"ExampleSuite",
],
"part": None,
"runtime_status": "ready",
"status": "unknown",
"tags": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from testplan import TestplanMock
from testplan.common import entity
from testplan.common.utils.comparison import compare, ReportOptions
from testplan.common.utils.comparison import compare
from testplan.common.utils.context import context
from testplan.common.utils.logger import USER_INFO
from testplan.common.utils.timing import wait
Expand Down

0 comments on commit e141614

Please sign in to comment.