GRAYBYTE WORDPRESS FILE MANAGER8462

Server IP : 198.54.121.189 / Your IP : 216.73.216.112
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp//common_test.py
#! /usr/bin/python2

# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

"""Unit tests for the common.py file."""

import gyp.common
import unittest
import sys


class TestTopologicallySorted(unittest.TestCase):
  def test_Valid(self):
    """Test that sorting works on a valid graph with one possible order."""
    graph = {
        'a': ['b', 'c'],
        'b': [],
        'c': ['d'],
        'd': ['b'],
        }
    def GetEdge(node):
      return tuple(graph[node])
    self.assertEqual(
      gyp.common.TopologicallySorted(graph.keys(), GetEdge),
      ['a', 'c', 'd', 'b'])

  def test_Cycle(self):
    """Test that an exception is thrown on a cyclic graph."""
    graph = {
        'a': ['b'],
        'b': ['c'],
        'c': ['d'],
        'd': ['a'],
        }
    def GetEdge(node):
      return tuple(graph[node])
    self.assertRaises(
      gyp.common.CycleError, gyp.common.TopologicallySorted,
      graph.keys(), GetEdge)


class TestGetFlavor(unittest.TestCase):
  """Test that gyp.common.GetFlavor works as intended"""
  original_platform = ''

  def setUp(self):
    self.original_platform = sys.platform

  def tearDown(self):
    sys.platform = self.original_platform

  def assertFlavor(self, expected, argument, param):
    sys.platform = argument
    self.assertEqual(expected, gyp.common.GetFlavor(param))

  def test_platform_default(self):
    self.assertFlavor('freebsd', 'freebsd9' , {})
    self.assertFlavor('freebsd', 'freebsd10', {})
    self.assertFlavor('openbsd', 'openbsd5' , {})
    self.assertFlavor('solaris', 'sunos5'   , {})
    self.assertFlavor('solaris', 'sunos'    , {})
    self.assertFlavor('linux'  , 'linux2'   , {})
    self.assertFlavor('linux'  , 'linux3'   , {})

  def test_param(self):
    self.assertFlavor('foobar', 'linux2' , {'flavor': 'foobar'})


if __name__ == '__main__':
  unittest.main()

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
January 01 1970 00:00:00
root / root
0
generator
--
March 03 2024 22:36:29
root / root
0755
MSVSNew.py
11.656 KB
March 10 2021 14:36:38
root / root
0644
MSVSProject.py
6.237 KB
March 10 2021 14:36:38
root / root
0644
MSVSSettings.py
44.11 KB
March 10 2021 14:36:38
root / root
0644
MSVSSettings_test.py
64.562 KB
March 10 2021 14:36:38
root / root
0644
MSVSToolFile.py
1.762 KB
March 10 2021 14:36:38
root / root
0644
MSVSUserFile.py
4.967 KB
March 10 2021 14:36:38
root / root
0644
MSVSUtil.py
9.31 KB
March 10 2021 14:36:38
root / root
0644
MSVSVersion.py
17.024 KB
March 10 2021 14:36:38
root / root
0644
__init__.py
21.868 KB
March 10 2021 14:36:38
root / root
0644
common.py
20.579 KB
March 10 2021 14:36:38
root / root
0644
common_test.py
1.918 KB
March 10 2021 14:36:38
root / root
0644
easy_xml.py
4.873 KB
March 10 2021 14:36:38
root / root
0644
easy_xml_test.py
3.249 KB
March 10 2021 14:36:38
root / root
0644
flock_tool.py
1.706 KB
March 10 2021 14:36:38
root / root
0644
input.py
113.647 KB
March 10 2021 14:36:38
root / root
0644
input_test.py
3.11 KB
March 10 2021 14:36:38
root / root
0644
mac_tool.py
22.892 KB
March 10 2021 14:36:38
root / root
0644
msvs_emulation.py
46.759 KB
March 10 2021 14:36:38
root / root
0644
ninja_syntax.py
5.406 KB
March 10 2021 14:36:38
root / root
0644
simple_copy.py
1.302 KB
March 10 2021 14:36:38
root / root
0644
win_tool.py
12.723 KB
March 10 2021 14:36:38
root / root
0644
xcode_emulation.py
64.854 KB
March 10 2021 14:36:38
root / root
0644
xcode_ninja.py
10.32 KB
March 10 2021 14:36:38
root / root
0644
xcodeproj_file.py
117.659 KB
March 10 2021 14:36:38
root / root
0644
xml_fix.py
2.123 KB
March 10 2021 14:36:38
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF