Forráskód Böngészése

[U] Test color scale

Azalea (on HyDEV-Daisy) 3 éve
szülő
commit
6d77ebc7a7
2 módosított fájl, 3 hozzáadás és 1 törlés
  1. 1 1
      hyfetch/color_scale.py
  2. 2 0
      test.py

+ 1 - 1
hyfetch/color_scale.py

@@ -62,7 +62,7 @@ class Scale:
         return RGB(*get_raw(self.rgb, ratio))
 
 
-if __name__ == '__main__':
+def test_color_scale():
     scale = Scale(['#232323', '#4F1879', '#B43A78', '#F98766', '#FCFAC0'])
 
     colors = 100

+ 2 - 0
test.py

@@ -1,3 +1,4 @@
+from hyfetch.color_scale import test_color_scale
 from hyfetch.color_util import RGB, printc
 from hyfetch.neofetch_util import get_command_path, run_neofetch
 from hyfetch.presets import PRESETS
@@ -35,3 +36,4 @@ def test_rgb_8bit_conversion():
 
 if __name__ == '__main__':
     test_rgb_8bit_conversion()
+    test_color_scale()