File: test_win32.py

package info (click to toggle)
python-setproctitle 1.3.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 272 kB
  • sloc: ansic: 946; python: 659; makefile: 21
file content (22 lines) | stat: -rw-r--r-- 534 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import pytest
import setproctitle
import sys  # noqa

skip_if_not_win32 = pytest.mark.skipif(
    "sys.platform != 'win32'", reason="Windows only test"
)

pytestmark = [skip_if_not_win32]


def test_setproctitle():
    title = "setproctitle_test"
    setproctitle.setproctitle(title)
    assert title == setproctitle.getproctitle()


def test_setthreadtitle():
    title = "setproctitle_test"
    # This is currently a no-op on Windows. Let's make sure
    # that at least it doesn't error out.
    setproctitle.setthreadtitle(title)