xvfbwrapper 0.2.28__tar.gz → 0.2.29__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xvfbwrapper
3
- Version: 0.2.28
3
+ Version: 0.2.29
4
4
  Summary: Manage headless displays with Xvfb (X virtual framebuffer)
5
5
  Author: Corey Goldberg
6
6
  Maintainer: Corey Goldberg
@@ -164,7 +164,7 @@ xvfb.start()
164
164
  from xvfbwrapper import Xvfb
165
165
 
166
166
  xvfb = Xvfb(display=23)
167
- xvfb.start() # Xvfb will start on display :23
167
+ xvfb.start() # Xvfb will start on display :23
168
168
  ```
169
169
 
170
170
  #### Setting XDG_SESSION_TYPE:
@@ -194,7 +194,7 @@ creating an `xvfbwrapper.Xvfb` instance. For example:
194
194
  from xvfbwrapper import Xvfb
195
195
 
196
196
  xvfb = Xvfb(nolisten="tcp")
197
- xvfb.start() # Xvfb will be called with the `-nolisten tcp` argument
197
+ xvfb.start() # Xvfb will be called with the `-nolisten tcp` argument
198
198
  ```
199
199
 
200
200
  However, there are other possible types of arguments:
@@ -212,7 +212,7 @@ an `xvfbwrapper.Xvfb` instance. For example:
212
212
  from xvfbwrapper import Xvfb
213
213
 
214
214
  xvfb = Xvfb(extra_args=("ttyxx", "-nocursor", "+extension", "RANDR"))
215
- xvfb.start() # Xvfb will be called with the `ttyxx -nocursor +extension RANDR` arguments
215
+ xvfb.start() # Xvfb will be called with the `ttyxx -nocursor +extension RANDR` arguments
216
216
  ```
217
217
 
218
218
  #### Multithreaded execution:
@@ -260,7 +260,6 @@ from xvfbwrapper import Xvfb
260
260
 
261
261
 
262
262
  class TestPage(unittest.TestCase):
263
-
264
263
  def setUp(self):
265
264
  xvfb = Xvfb(set_xdg_session_type=True)
266
265
  xvfb.start()
@@ -133,7 +133,7 @@ xvfb.start()
133
133
  from xvfbwrapper import Xvfb
134
134
 
135
135
  xvfb = Xvfb(display=23)
136
- xvfb.start() # Xvfb will start on display :23
136
+ xvfb.start() # Xvfb will start on display :23
137
137
  ```
138
138
 
139
139
  #### Setting XDG_SESSION_TYPE:
@@ -163,7 +163,7 @@ creating an `xvfbwrapper.Xvfb` instance. For example:
163
163
  from xvfbwrapper import Xvfb
164
164
 
165
165
  xvfb = Xvfb(nolisten="tcp")
166
- xvfb.start() # Xvfb will be called with the `-nolisten tcp` argument
166
+ xvfb.start() # Xvfb will be called with the `-nolisten tcp` argument
167
167
  ```
168
168
 
169
169
  However, there are other possible types of arguments:
@@ -181,7 +181,7 @@ an `xvfbwrapper.Xvfb` instance. For example:
181
181
  from xvfbwrapper import Xvfb
182
182
 
183
183
  xvfb = Xvfb(extra_args=("ttyxx", "-nocursor", "+extension", "RANDR"))
184
- xvfb.start() # Xvfb will be called with the `ttyxx -nocursor +extension RANDR` arguments
184
+ xvfb.start() # Xvfb will be called with the `ttyxx -nocursor +extension RANDR` arguments
185
185
  ```
186
186
 
187
187
  #### Multithreaded execution:
@@ -229,7 +229,6 @@ from xvfbwrapper import Xvfb
229
229
 
230
230
 
231
231
  class TestPage(unittest.TestCase):
232
-
233
232
  def setUp(self):
234
233
  xvfb = Xvfb(set_xdg_session_type=True)
235
234
  xvfb.start()
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "xvfbwrapper"
7
- version = "0.2.28"
7
+ version = "0.2.29"
8
8
  description = "Manage headless displays with Xvfb (X virtual framebuffer)"
9
9
  license = "MIT"
10
10
  license-files = ["LICENSE"]
@@ -52,9 +52,7 @@ type = [
52
52
  "types-psutil",
53
53
  ]
54
54
  validate = [
55
- "packaging",
56
- "tomli",
57
- "validate-pyproject",
55
+ "validate-pyproject[all]",
58
56
  ]
59
57
 
60
58
  [tool.setuptools]
@@ -21,9 +21,6 @@ class XvfbCleanTestCase(unittest.TestCase):
21
21
 
22
22
  - Records existing Xvfb processes at class start.
23
23
  - Kills newly spawned Xvfb processes at class end.
24
-
25
- - Records existing Xvfb processes at test start.
26
- - Kills newly spawned Xvfb processes at test end.
27
24
  """
28
25
 
29
26
  # ---------- Utility ----------
@@ -269,7 +266,8 @@ class TestXvfb(XvfbCleanTestCase):
269
266
  self.assertEqual(xvfb.new_display, display_num)
270
267
  self.assertIsNotNone(xvfb.proc)
271
268
  with self.assertRaisesRegex(
272
- RuntimeError, f"Could not lock display :{display_num}"
269
+ RuntimeError,
270
+ f"Could not lock display :{display_num}",
273
271
  ):
274
272
  xvfb2.start()
275
273
 
@@ -348,15 +346,15 @@ class TestXvfb(XvfbCleanTestCase):
348
346
  def test_environ_keyword_isolates_environment_modification(self):
349
347
  # Check that start and stop methods modified the environ dict if
350
348
  # passed and does not modify os.environ
351
- env_duped = os.environ.copy()
352
- xvfb = Xvfb(environ=env_duped)
349
+ custom_env = os.environ.copy()
350
+ xvfb = Xvfb(environ=custom_env)
353
351
  xvfb.start()
354
352
  new_display = f":{xvfb.new_display}"
355
353
  self.assertEqual(":0", os.environ["DISPLAY"])
356
- self.assertEqual(new_display, env_duped["DISPLAY"])
354
+ self.assertEqual(new_display, custom_env["DISPLAY"])
357
355
  xvfb.stop()
358
356
  self.assertEqual(":0", os.environ["DISPLAY"])
359
- self.assertEqual(":0", env_duped["DISPLAY"])
357
+ self.assertEqual(":0", custom_env["DISPLAY"])
360
358
  self.assertIsNone(xvfb.proc)
361
359
 
362
360
  def test_environ_is_passed_to_xvfb_subprocess(self):
@@ -367,7 +365,10 @@ class TestXvfb(XvfbCleanTestCase):
367
365
  self.addCleanup(xvfb.stop)
368
366
  xvfb.start()
369
367
  proc = psutil.Process(xvfb.proc.pid)
370
- self.assertEqual(proc.environ().get("XVFBWRAPPER_TEST_MARKER"), marker_value)
368
+ self.assertEqual(
369
+ proc.environ().get("XVFBWRAPPER_TEST_MARKER"),
370
+ marker_value,
371
+ )
371
372
 
372
373
  def test_start_failure_without_initial_display_env(self):
373
374
  # Provide a custom env *without* DISPLAY so orig_display_var == None
@@ -388,7 +389,8 @@ class TestXvfb(XvfbCleanTestCase):
388
389
  with (
389
390
  patch.object(xvfb, "_local_display_exists", return_value=False),
390
391
  self.assertRaisesRegex(
391
- RuntimeError, f"Xvfb display did not open: {expected_cmd_args}"
392
+ RuntimeError,
393
+ f"Xvfb display did not open: {expected_cmd_args}",
392
394
  ),
393
395
  ):
394
396
  xvfb.start()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xvfbwrapper
3
- Version: 0.2.28
3
+ Version: 0.2.29
4
4
  Summary: Manage headless displays with Xvfb (X virtual framebuffer)
5
5
  Author: Corey Goldberg
6
6
  Maintainer: Corey Goldberg
@@ -164,7 +164,7 @@ xvfb.start()
164
164
  from xvfbwrapper import Xvfb
165
165
 
166
166
  xvfb = Xvfb(display=23)
167
- xvfb.start() # Xvfb will start on display :23
167
+ xvfb.start() # Xvfb will start on display :23
168
168
  ```
169
169
 
170
170
  #### Setting XDG_SESSION_TYPE:
@@ -194,7 +194,7 @@ creating an `xvfbwrapper.Xvfb` instance. For example:
194
194
  from xvfbwrapper import Xvfb
195
195
 
196
196
  xvfb = Xvfb(nolisten="tcp")
197
- xvfb.start() # Xvfb will be called with the `-nolisten tcp` argument
197
+ xvfb.start() # Xvfb will be called with the `-nolisten tcp` argument
198
198
  ```
199
199
 
200
200
  However, there are other possible types of arguments:
@@ -212,7 +212,7 @@ an `xvfbwrapper.Xvfb` instance. For example:
212
212
  from xvfbwrapper import Xvfb
213
213
 
214
214
  xvfb = Xvfb(extra_args=("ttyxx", "-nocursor", "+extension", "RANDR"))
215
- xvfb.start() # Xvfb will be called with the `ttyxx -nocursor +extension RANDR` arguments
215
+ xvfb.start() # Xvfb will be called with the `ttyxx -nocursor +extension RANDR` arguments
216
216
  ```
217
217
 
218
218
  #### Multithreaded execution:
@@ -260,7 +260,6 @@ from xvfbwrapper import Xvfb
260
260
 
261
261
 
262
262
  class TestPage(unittest.TestCase):
263
-
264
263
  def setUp(self):
265
264
  xvfb = Xvfb(set_xdg_session_type=True)
266
265
  xvfb.start()
File without changes
File without changes
File without changes
File without changes