From a4dd113028d0a32548d7ad160f09621bda4a759c Mon Sep 17 00:00:00 2001 From: Jan Hutar Date: Thu, 9 Nov 2023 08:43:05 +0100 Subject: [PATCH] fix: jscpd: Clone found --- tests/test_cluster_read.py | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/tests/test_cluster_read.py b/tests/test_cluster_read.py index b393680..48ff917 100755 --- a/tests/test_cluster_read.py +++ b/tests/test_cluster_read.py @@ -130,30 +130,20 @@ def test_copy_from(self): string = """ - name: somevalue constant: Hello world - - name: mycopyfrom + - name: mycopyfrom_exists copy_from: somevalue + - name: mycopyfrom_missing + copy_from: somevalue_that_does_not_exist """ ri = opl.cluster_read.RequestedInfo(string) k, v = next(ri) self.assertEqual(k, "somevalue") self.assertEqual(v, "Hello world") k, v = next(ri) - self.assertEqual(k, "mycopyfrom") - self.assertEqual(v, "Hello world") - - def test_copy_from_negative(self): - string = """ - - name: somevalue - constant: Hello world - - name: mycopyfrom - copy_from: somevalue_that_does_not_exist - """ - ri = opl.cluster_read.RequestedInfo(string) - k, v = next(ri) - self.assertEqual(k, "somevalue") + self.assertEqual(k, "mycopyfrom_exists") self.assertEqual(v, "Hello world") k, v = next(ri) - self.assertEqual(k, "mycopyfrom") + self.assertEqual(k, "mycopyfrom_missing") self.assertEqual(v, None) def test_wrong_config(self):