Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bitia-cli
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bitia
bitia-cli
Commits
a6bce64d
Commit
a6bce64d
authored
2 years ago
by
dilawar
Browse files
Options
Downloads
Patches
Plain Diff
chore (ci): Use the module
parent
80390649
Branches
main
Tags
v0.2.3
1 merge request
!2
version 0.2.0
Pipeline
#3740
failed with stages
in 1 minute and 57 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_cli.py
+3
-15
3 additions, 15 deletions
tests/test_cli.py
with
3 additions
and
15 deletions
tests/test_cli.py
+
3
−
15
View file @
a6bce64d
import
sys
import
shlex
from
pathlib
import
Path
import
subprocess
def
run_command
(
cmd
:
str
,
args
:
str
):
cmd
=
f
"
{
sys
.
executable
}
-m bitia
{
cmd
}
{
args
}
"
print
(
f
"
Executing `
{
shlex
.
split
(
cmd
)
}
`
"
)
assert
Path
(
sys
.
executable
).
is_file
()
p
=
subprocess
.
run
(
shlex
.
split
(
cmd
),
capture_output
=
True
)
return
p
.
stdout
from
bitia.__main__
import
run_pipeline
def
test_cli_sanity
():
output
=
run_command
(
"
run
"
,
'"
ls -ltr /
"'
)
print
(
output
.
decode
().
rstrip
())
assert
len
(
output
)
>
20
,
"
Too little output
"
for
line
in
run_pipeline
(
"
ls -ltr /
"
):
print
(
line
)
if
__name__
==
"
__main__
"
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment