blob: b5d5b11ec52da2e1a71d9f781df77ee04387518a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
import unittest
import deckit.display as display
class Resolution(unittest.TestCase):
def test_reads_adb(self):
self.assertEqual(
display.tablet_resolution({"display": {}}, adb=lambda: "Physical size: 1920x1200"),
"1920x1200")
def test_config_override(self):
self.assertEqual(
display.tablet_resolution({"display": {"resolution": "2560x1600"}},
adb=lambda: "1920x1200"),
"2560x1600")
if __name__ == "__main__":
unittest.main()
|