mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-11 01:28:19 +03:00
17 lines
416 B
Python
17 lines
416 B
Python
import subprocess
|
|
|
|
from kitty.fast_data_types import num_users
|
|
|
|
from . import BaseTest
|
|
|
|
|
|
class UTMPTest(BaseTest):
|
|
|
|
def test_num_users(self):
|
|
# who is the control
|
|
try:
|
|
expected = subprocess.check_output(['who']).decode('utf-8').count('\n')
|
|
except FileNotFoundError:
|
|
self.skipTest('No who executable cannot verify num_users')
|
|
self.ae(num_users(), expected)
|