Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test_win32print.py 681B

1 year ago
123456789101112131415161718192021222324
  1. # Tests (scarce) for win32print module
  2. import unittest
  3. import win32print as wprn
  4. class Win32PrintTestCase(unittest.TestCase):
  5. def setUp(self):
  6. self.printer_idx = 0
  7. self.printer_levels_all = list(range(1, 10))
  8. self.local_printers = wprn.EnumPrinters(wprn.PRINTER_ENUM_LOCAL, None, 1)
  9. def test_printer_levels_read_dummy(self):
  10. if not self.local_printers:
  11. print("Test didn't run (no local printers)!")
  12. return
  13. ph = wprn.OpenPrinter(self.local_printers[self.printer_idx][2])
  14. for level in self.printer_levels_all:
  15. wprn.GetPrinter(ph, level)
  16. if __name__ == "__main__":
  17. unittest.main()