/IronPython_Main/Languages/IronPython/Tests/interop/net/loadorder/t3b.py

# · Python · 45 lines · 11 code · 10 blank · 24 comment · 0 complexity · b973d567d8cd124207fdfaf097299fb5 MD5 · raw file

  1. #####################################################################################
  2. #
  3. # Copyright (c) Microsoft Corporation. All rights reserved.
  4. #
  5. # This source code is subject to terms and conditions of the Apache License, Version 2.0. A
  6. # copy of the license can be found in the License.html file at the root of this distribution. If
  7. # you cannot locate the Apache License, Version 2.0, please send an email to
  8. # ironpy@microsoft.com. By using this source code in any fashion, you are agreeing to be bound
  9. # by the terms of the Apache License, Version 2.0.
  10. #
  11. # You must not remove this notice, or any other, from this software.
  12. #
  13. #
  14. #####################################################################################
  15. from iptest.assert_util import *
  16. add_clr_assemblies("loadorder_3")
  17. # namespace First {
  18. # public class Generic1<K, V> {
  19. # public static string Flag = typeof(Generic1<,>).FullName;
  20. # }
  21. # }
  22. import First
  23. add_clr_assemblies("loadorder_3b")
  24. # namespace Second {
  25. # public class Generic2 {
  26. # public static string Flag = typeof(Generic2).FullName;
  27. # }
  28. # }
  29. import Second
  30. AreEqual(First.Generic1[str, str].Flag, "First.Generic1`2")
  31. AreEqual(Second.Generic2.Flag, "Second.Generic2")
  32. from First import *
  33. from Second import *
  34. AreEqual(Generic1[str, str].Flag, "First.Generic1`2")
  35. AreEqual(Generic2.Flag, "Second.Generic2")