Skip to content
This repository has been archived by the owner on Apr 13, 2019. It is now read-only.
/ sway-tests Public archive

Unofficial test suite for sway

License

Notifications You must be signed in to change notification settings

swaywm/sway-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sway-tests

Unofficial test suite for sway.

About

The test suite starts a new sway instance in headless mode for each test. Add your tests to the test directory. Use the sway pytest fixture to get the test environment including a connection to the ipc.

Running

The recommended way to run the sway test suite is to clone the repository and run the tests in a virtualenv for python3.

virtualenv env
source env/bin/activate
pip install -r requirements.txt

Now run the test suite like this:

env/bin/pytest --sway=/path/to/sway

The tests should work fine with i3 too:

env/bin/pytest --sway=$(which i3)

Example Test

def test_ipc_version(sway):
    version = sway.ipc.get_version()
    assert version.variant
    assert version.human_readable
    assert version.major >= 0
    assert version.minor >= 0
    assert version.patch >= 0

License

Copyright 2018 Sway Contributors

MIT (see LICENSE)

About

Unofficial test suite for sway

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published