Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
poezio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
178
Issues
178
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poezio
poezio
Commits
5f0c0fbb
Commit
5f0c0fbb
authored
Aug 21, 2016
by
mathieui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tests
parent
84e59b05
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
18 additions
and
33 deletions
+18
-33
.travis.yml
.travis.yml
+3
-1
test/test_common.py
test/test_common.py
+6
-9
test/test_completion.py
test/test_completion.py
+2
-5
test/test_config.py
test/test_config.py
+1
-4
test/test_poopt.py
test/test_poopt.py
+1
-3
test/test_theming.py
test/test_theming.py
+1
-3
test/test_windows.py
test/test_windows.py
+3
-5
test/test_xhtml.py
test/test_xhtml.py
+1
-3
No files found.
.travis.yml
View file @
5f0c0fbb
language
:
python
python
:
-
"
3.
4
"
-
"
3.
5
"
install
:
-
pip install -r requirements.txt
-
python setup.py build_ext --inplace
-
python setup.py install
script
:
make test
test/test_common.py
View file @
5f0c0fbb
...
...
@@ -2,19 +2,16 @@
Test the functions in the `common` module
"""
import
sys
sys
.
path
.
append
(
'poezio'
)
import
time
import
pytest
import
datetime
from
slixmpp
import
JID
from
datetime
import
timedelta
from
common
import
(
_datetime_tuple
as
datetime_tuple
,
get_utc_time
,
get_local_time
,
shell_split
,
_find_argument_quoted
as
find_argument_quoted
,
_find_argument_unquoted
as
find_argument_unquoted
,
parse_str_to_secs
,
parse_secs_to_str
,
safeJID
)
from
poezio.
common
import
(
_datetime_tuple
as
datetime_tuple
,
get_utc_time
,
get_local_time
,
shell_split
,
_find_argument_quoted
as
find_argument_quoted
,
_find_argument_unquoted
as
find_argument_unquoted
,
parse_str_to_secs
,
parse_secs_to_str
,
safeJID
)
def
test_utc_time
():
delta
=
timedelta
(
seconds
=-
3600
)
...
...
@@ -65,4 +62,4 @@ def test_parse_secs_to_str():
def
test_safeJID
():
assert
safeJID
(
'toto@titi/tata'
)
==
JID
(
'toto@titi/tata'
)
assert
safeJID
(
'
é_è
'
)
==
JID
(
''
)
assert
safeJID
(
'
toto@…
'
)
==
JID
(
''
)
test/test_completion.py
View file @
5f0c0fbb
...
...
@@ -5,19 +5,16 @@ Test the completions methods on an altered input object.
import
string
import
pytest
import
random
import
sys
import
os
sys
.
path
.
append
(
'poezio'
)
class
ConfigShim
(
object
):
def
get
(
self
,
*
args
,
**
kwargs
):
return
''
import
config
from
poezio
import
config
config
.
config
=
ConfigShim
()
from
windows
import
Input
from
poezio.
windows
import
Input
@
pytest
.
fixture
(
scope
=
"function"
)
def
input_obj
():
...
...
test/test_config.py
View file @
5f0c0fbb
...
...
@@ -4,13 +4,10 @@ Test the config module
import
tempfile
import
pytest
import
sys
import
os
sys
.
path
.
append
(
'poezio'
)
import
config
from
poezio
import
config
@
pytest
.
yield_fixture
(
scope
=
"module"
)
def
config_obj
():
...
...
test/test_poopt.py
View file @
5f0c0fbb
...
...
@@ -3,10 +3,8 @@ Test of the poopt module
"""
import
pytest
import
sys
sys
.
path
.
append
(
'poezio'
)
from
poopt
import
cut_text
from
po
ezio.po
opt
import
cut_text
def
test_cut_text
():
...
...
test/test_theming.py
View file @
5f0c0fbb
...
...
@@ -2,11 +2,9 @@
Test the functions in the `theming` module
"""
import
sys
import
pytest
sys
.
path
.
append
(
'poezio'
)
from
theming
import
dump_tuple
,
read_tuple
from
poezio.
theming
import
dump_tuple
,
read_tuple
def
test_read_tuple
():
assert
read_tuple
(
'1,-1,u'
)
==
((
1
,
-
1
),
'u'
)
...
...
test/test_windows.py
View file @
5f0c0fbb
import
pytest
import
sys
sys
.
path
.
append
(
'poezio'
)
class
ConfigShim
(
object
):
def
get
(
self
,
*
args
,
**
kwargs
):
return
''
import
config
from
poezio
import
config
config
.
config
=
ConfigShim
()
import
core
from
poezio
import
core
from
windows
import
Input
,
HistoryInput
,
MessageInput
,
CommandInput
from
poezio.
windows
import
Input
,
HistoryInput
,
MessageInput
,
CommandInput
@
pytest
.
fixture
def
input
():
...
...
test/test_xhtml.py
View file @
5f0c0fbb
...
...
@@ -3,11 +3,9 @@ Test the functions in the `xhtml` module
"""
import
pytest
import
sys
import
xml
sys
.
path
.
append
(
'poezio'
)
from
xhtml
import
(
poezio_colors_to_html
,
xhtml_to_poezio_colors
,
from
poezio.
xhtml
import
(
poezio_colors_to_html
,
xhtml_to_poezio_colors
,
parse_css
,
clean_text
)
def
test_clean_text
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment